All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Re: How to change endian attribute for a memory region
  2002-10-15  8:42 How to change endian attribute for a memory region Laurent Mohin
@ 2002-10-14  8:57 ` Michael Meriin
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Meriin @ 2002-10-14  8:57 UTC (permalink / raw
  To: linuxppc-embedded, Laurent Mohin


> I'm trying to interface a 405GP chip with an EPSON S1D13506 graphic
> controller. Because the EPSON chip is a little endian, I need to have my
> framebuffer memory acceded in little endian mode.
> What is the best way to change endian attribute for a specific memory
> region (ioremap little endian)?
>
> Laurent

I suggest you to connect it to the uP as a byte wide device, this will
immediately solve your problem.
The second way you can do it for 16 bit bus to connect MSB and LSB wise a
wiser.
>
Best Regards,
                     Michael Meriin


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
  2002-10-15  9:55 ` Stefan Roese
@ 2002-10-14 10:18   ` Michael Meriin
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Meriin @ 2002-10-14 10:18 UTC (permalink / raw
  To: Stefan Roese, Laurent Mohin; +Cc: linuxppc-embedded


Stefan,

> why don't you use the MD4 signal of the Epson Chip to configure it as big
> endian device? Or am I missing something here?
>
> Best regards,
> Stefan.
>

First of all it is not my implementation problem :))
You are right you can use this signal,  but in my implementation for 13704
it was impossible to use it, because of other signals constrains:
 this signal was possible to be used only for 68000 bus.
So in our case (MPC855) we simply flipped the data bus, by the way only
after that we
found out that this solution was suggested by Epson too.

Best Regards,
                     Michael Meriin

> > Betreff: Re: How to change endian attribute for a memory region
> >
> >
> >
> > Michaêl,
> >
> > I can't connect the chip as a byte wide device due to performance
> > degradation.
> > Due to other constraints, I can't invert MSB and LSB. In fact,
> > due to color
> > mapping, if I work in 8 bit per pixel, I must address my
> > framebuffer in big
> > endian mode. In 16 bit per pixel, I need to use little endian mode.
> > So I really need to change the endian attribute.
> >
> > Thanks for your answer
> >
> > Laurent
> >
> >
> >
> >
> > "Michael Meriin" <Michael@KSWaves.com> on 14/10/2002 10:57:00
> >
> > To:    linuxppc-embedded@lists.linuxppc.org, Laurent
> >        Mohin/SE/Wavetek@Global
> > cc:
> > Subject:    Re: How to change endian attribute for a memory region
> >
> >
> >
> > > I'm trying to interface a 405GP chip with an EPSON S1D13506 graphic
> > > controller. Because the EPSON chip is a little endian, I need to have
my
> > > framebuffer memory acceded in little endian mode.
> > > What is the best way to change endian attribute for a specific memory
> > > region (ioremap little endian)?
> > >
> > > Laurent
> >
> > I suggest you to connect it to the uP as a byte wide device, this will
> > immediately solve your problem.
> > The second way you can do it for 16 bit bus to connect MSB and LSB wise
a
> > wiser.
> > >
> > Best Regards,
> >                      Michael Meriin
> >
> >
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* How to change endian attribute for a memory region
@ 2002-10-15  8:42 Laurent Mohin
  2002-10-14  8:57 ` Michael Meriin
  0 siblings, 1 reply; 13+ messages in thread
From: Laurent Mohin @ 2002-10-15  8:42 UTC (permalink / raw
  To: linuxppc-embedded


Hello all,

I'm trying to interface a 405GP chip with an EPSON S1D13506 graphic
controller. Because the EPSON chip is a little endian, I need to have my
framebuffer memory acceded in little endian mode.
What is the best way to change endian attribute for a specific memory
region (ioremap little endian)?

Laurent


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
@ 2002-10-15  9:08 Laurent Mohin
  2002-10-15  9:55 ` Stefan Roese
  0 siblings, 1 reply; 13+ messages in thread
From: Laurent Mohin @ 2002-10-15  9:08 UTC (permalink / raw
  To: Michael Meriin; +Cc: linuxppc-embedded


Michaêl,

I can't connect the chip as a byte wide device due to performance
degradation.
Due to other constraints, I can't invert MSB and LSB. In fact, due to color
mapping, if I work in 8 bit per pixel, I must address my framebuffer in big
endian mode. In 16 bit per pixel, I need to use little endian mode.
So I really need to change the endian attribute.

Thanks for your answer

Laurent




"Michael Meriin" <Michael@KSWaves.com> on 14/10/2002 10:57:00

To:    linuxppc-embedded@lists.linuxppc.org, Laurent
       Mohin/SE/Wavetek@Global
cc:
Subject:    Re: How to change endian attribute for a memory region



> I'm trying to interface a 405GP chip with an EPSON S1D13506 graphic
> controller. Because the EPSON chip is a little endian, I need to have my
> framebuffer memory acceded in little endian mode.
> What is the best way to change endian attribute for a specific memory
> region (ioremap little endian)?
>
> Laurent

I suggest you to connect it to the uP as a byte wide device, this will
immediately solve your problem.
The second way you can do it for 16 bit bus to connect MSB and LSB wise a
wiser.
>
Best Regards,
                     Michael Meriin


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
  2002-10-15  9:08 Laurent Mohin
@ 2002-10-15  9:55 ` Stefan Roese
  2002-10-14 10:18   ` Michael Meriin
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Roese @ 2002-10-15  9:55 UTC (permalink / raw
  To: Laurent Mohin, Michael Meriin; +Cc: linuxppc-embedded


Michael,

why don't you use the MD4 signal of the Epson Chip to configure it as big
endian device? Or am I missing something here?

Best regards,
Stefan.

> -----Ursprüngliche Nachricht-----
> Von: owner-linuxppc-embedded@lists.linuxppc.org
> [mailto:owner-linuxppc-embedded@lists.linuxppc.org]Im Auftrag von
> Laurent Mohin
> Gesendet: Dienstag, 15. Oktober 2002 11:08
> An: Michael Meriin
> Cc: linuxppc-embedded@lists.linuxppc.org
> Betreff: Re: How to change endian attribute for a memory region
>
>
>
> Michaêl,
>
> I can't connect the chip as a byte wide device due to performance
> degradation.
> Due to other constraints, I can't invert MSB and LSB. In fact,
> due to color
> mapping, if I work in 8 bit per pixel, I must address my
> framebuffer in big
> endian mode. In 16 bit per pixel, I need to use little endian mode.
> So I really need to change the endian attribute.
>
> Thanks for your answer
>
> Laurent
>
>
>
>
> "Michael Meriin" <Michael@KSWaves.com> on 14/10/2002 10:57:00
>
> To:    linuxppc-embedded@lists.linuxppc.org, Laurent
>        Mohin/SE/Wavetek@Global
> cc:
> Subject:    Re: How to change endian attribute for a memory region
>
>
>
> > I'm trying to interface a 405GP chip with an EPSON S1D13506 graphic
> > controller. Because the EPSON chip is a little endian, I need to have my
> > framebuffer memory acceded in little endian mode.
> > What is the best way to change endian attribute for a specific memory
> > region (ioremap little endian)?
> >
> > Laurent
>
> I suggest you to connect it to the uP as a byte wide device, this will
> immediately solve your problem.
> The second way you can do it for 16 bit bus to connect MSB and LSB wise a
> wiser.
> >
> Best Regards,
>                      Michael Meriin
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
@ 2002-10-15 11:07 Laurent Mohin
  2002-10-15 14:15 ` Matt Porter
  0 siblings, 1 reply; 13+ messages in thread
From: Laurent Mohin @ 2002-10-15 11:07 UTC (permalink / raw
  To: Stefan Roese; +Cc: Michael Meriin, linuxppc-embedded


Stefan,

I'm the initiator of the question.
I use the Epson chip in big endian mode. The problem is that in 16 bpp
mode, the RGB mapping into video memory is fixed by the chip and described
in little endian format.

By the way, I really studied the chip and if I want to be able to manage
both 8 bpp and 16 bpp mode, I need to be able to change the endianness
attribute of the memory region.

Thanks for your answer,

Laurent




"Stefan Roese" <stefan.roese@esd-electronics.com> on 15/10/2002 11:55:51

To:    Laurent Mohin/SE/Wavetek@Global, "Michael Meriin"
       <Michael@KSWaves.com>
cc:    linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




Michael,

why don't you use the MD4 signal of the Epson Chip to configure it as big
endian device? Or am I missing something here?

Best regards,
Stefan.

> -----Ursprüngliche Nachricht-----
> Von: owner-linuxppc-embedded@lists.linuxppc.org
> [mailto:owner-linuxppc-embedded@lists.linuxppc.org]Im Auftrag von
> Laurent Mohin
> Gesendet: Dienstag, 15. Oktober 2002 11:08
> An: Michael Meriin
> Cc: linuxppc-embedded@lists.linuxppc.org
> Betreff: Re: How to change endian attribute for a memory region
>
>
>
> Michaêl,
>
> I can't connect the chip as a byte wide device due to performance
> degradation.
> Due to other constraints, I can't invert MSB and LSB. In fact,
> due to color
> mapping, if I work in 8 bit per pixel, I must address my
> framebuffer in big
> endian mode. In 16 bit per pixel, I need to use little endian mode.
> So I really need to change the endian attribute.
>
> Thanks for your answer
>
> Laurent
>
>
>
>
> "Michael Meriin" <Michael@KSWaves.com> on 14/10/2002 10:57:00
>
> To:    linuxppc-embedded@lists.linuxppc.org, Laurent
>        Mohin/SE/Wavetek@Global
> cc:
> Subject:    Re: How to change endian attribute for a memory region
>
>
>
> > I'm trying to interface a 405GP chip with an EPSON S1D13506 graphic
> > controller. Because the EPSON chip is a little endian, I need to have
my
> > framebuffer memory acceded in little endian mode.
> > What is the best way to change endian attribute for a specific memory
> > region (ioremap little endian)?
> >
> > Laurent
>
> I suggest you to connect it to the uP as a byte wide device, this will
> immediately solve your problem.
> The second way you can do it for 16 bit bus to connect MSB and LSB wise a
> wiser.
> >
> Best Regards,
>                      Michael Meriin
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
  2002-10-15 11:07 Laurent Mohin
@ 2002-10-15 14:15 ` Matt Porter
  2002-10-15 14:35   ` Allen Curtis
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Porter @ 2002-10-15 14:15 UTC (permalink / raw
  To: Laurent Mohin; +Cc: Stefan Roese, Michael Meriin, linuxppc-embedded


On Tue, Oct 15, 2002 at 01:07:19PM +0200, Laurent Mohin wrote:
>
> Stefan,
>
> I'm the initiator of the question.
> I use the Epson chip in big endian mode. The problem is that in 16 bpp
> mode, the RGB mapping into video memory is fixed by the chip and described
> in little endian format.
>
> By the way, I really studied the chip and if I want to be able to manage
> both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> attribute of the memory region.

Why wouldn't you access video memory via a sthbrx instruction (writew)?

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
@ 2002-10-15 14:34 Ralph Blach
  0 siblings, 0 replies; 13+ messages in thread
From: Ralph Blach @ 2002-10-15 14:34 UTC (permalink / raw
  To: Matt Porter; +Cc: linuxppc-embedded


OK, I know this is absolute HERESY  for all you out there, and would never
be supported in the kernel tree,
and probably with very good reasons, but I'll mention it anyway.

ON the 405 and the 440 class processors, there is an endian bit in the TLB
which would make a 4k region
little endian.  To use this bit one would have to write an IOremap_LE and
support the bit in the page table,
but it could be used.

There are probabley better ways that are more inline with the PPC
philosophy.

Chip



Matt Porter <porter@cox.net>@lists.linuxppc.org on 10/15/2002 10:15:46 AM

Sent by:    owner-linuxppc-embedded@lists.linuxppc.org


To:    Laurent Mohin <laurent.mohin@acterna.com>
cc:    Stefan Roese <stefan.roese@esd-electronics.com>, Michael Meriin
       <Michael@KSWaves.com>, linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




On Tue, Oct 15, 2002 at 01:07:19PM +0200, Laurent Mohin wrote:
>
> Stefan,
>
> I'm the initiator of the question.
> I use the Epson chip in big endian mode. The problem is that in 16 bpp
> mode, the RGB mapping into video memory is fixed by the chip and
described
> in little endian format.
>
> By the way, I really studied the chip and if I want to be able to manage
> both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> attribute of the memory region.

Why wouldn't you access video memory via a sthbrx instruction (writew)?

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: How to change endian attribute for a memory region
  2002-10-15 14:15 ` Matt Porter
@ 2002-10-15 14:35   ` Allen Curtis
  0 siblings, 0 replies; 13+ messages in thread
From: Allen Curtis @ 2002-10-15 14:35 UTC (permalink / raw
  To: Matt Porter, Laurent Mohin
  Cc: Stefan Roese, Michael Meriin, linuxppc-embedded


> > By the way, I really studied the chip and if I want to be able to manage
> > both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> > attribute of the memory region.
>
> Why wouldn't you access video memory via a sthbrx instruction (writew)?

Right!
writew() - assumes that you are talking to a peripheral and all peripherals
must be little endian , thank you PCI.

__raw_writew() - accesses the memory in the native format which is
big-endian in your case.


To answer your other question:
You can not set an attribute on a memory region within the memory controller
to force the hardware to handle this for you on a region by region basis.
The chip's endianness may be configurable. This is an exercise let to the
programmer.  :(


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
@ 2002-10-15 14:57 Laurent Mohin
  0 siblings, 0 replies; 13+ messages in thread
From: Laurent Mohin @ 2002-10-15 14:57 UTC (permalink / raw
  To: Matt Porter; +Cc: Stefan Roese, Michael Meriin, linuxppc-embedded


Matt,

In fact, after registering my frame buffer driver, my video memory is
accessed directly by the X server.
So I can't control the instruction (writew or other) it will use.

Thanks,

Laurent




Matt Porter <porter@cox.net> on 15/10/2002 16:15:46

To:    Laurent Mohin/SE/Wavetek@Global
cc:    Stefan Roese <stefan.roese@esd-electronics.com>, Michael Meriin
       <Michael@KSWaves.com>, linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




On Tue, Oct 15, 2002 at 01:07:19PM +0200, Laurent Mohin wrote:
>
> Stefan,
>
> I'm the initiator of the question.
> I use the Epson chip in big endian mode. The problem is that in 16 bpp
> mode, the RGB mapping into video memory is fixed by the chip and
described
> in little endian format.
>
> By the way, I really studied the chip and if I want to be able to manage
> both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> attribute of the memory region.

Why wouldn't you access video memory via a sthbrx instruction (writew)?

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
@ 2002-10-15 15:00 Laurent Mohin
  2002-10-15 15:45 ` Dan Malek
  0 siblings, 1 reply; 13+ messages in thread
From: Laurent Mohin @ 2002-10-15 15:00 UTC (permalink / raw
  To: Ralph Blach; +Cc: Matt Porter, linuxppc-embedded


Ralph,

That was the purpose of my question. Has anybody written this IOremap_LE
function?

Laurent




"Ralph Blach" <rcblach@us.ibm.com> on 15/10/2002 16:34:14

To:    Matt Porter <porter@cox.net>
cc:    linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




OK, I know this is absolute HERESY  for all you out there, and would never
be supported in the kernel tree,
and probably with very good reasons, but I'll mention it anyway.

ON the 405 and the 440 class processors, there is an endian bit in the TLB
which would make a 4k region
little endian.  To use this bit one would have to write an IOremap_LE and
support the bit in the page table,
but it could be used.

There are probabley better ways that are more inline with the PPC
philosophy.

Chip



Matt Porter <porter@cox.net>@lists.linuxppc.org on 10/15/2002 10:15:46 AM

Sent by:    owner-linuxppc-embedded@lists.linuxppc.org


To:    Laurent Mohin <laurent.mohin@acterna.com>
cc:    Stefan Roese <stefan.roese@esd-electronics.com>, Michael Meriin
       <Michael@KSWaves.com>, linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




On Tue, Oct 15, 2002 at 01:07:19PM +0200, Laurent Mohin wrote:
>
> Stefan,
>
> I'm the initiator of the question.
> I use the Epson chip in big endian mode. The problem is that in 16 bpp
> mode, the RGB mapping into video memory is fixed by the chip and
described
> in little endian format.
>
> By the way, I really studied the chip and if I want to be able to manage
> both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> attribute of the memory region.

Why wouldn't you access video memory via a sthbrx instruction (writew)?

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
  2002-10-15 15:00 Laurent Mohin
@ 2002-10-15 15:45 ` Dan Malek
  0 siblings, 0 replies; 13+ messages in thread
From: Dan Malek @ 2002-10-15 15:45 UTC (permalink / raw
  To: Laurent Mohin; +Cc: Ralph Blach, Matt Porter, linuxppc-embedded


Laurent Mohin wrote:

> That was the purpose of my question. Has anybody written this IOremap_LE
> function?

If you are accessing this from a user space mapped frame buffer, it isn't
an ioremap() function but rather a generic Linux VM function.

Other platforms have solved this "problem" of mapping frame buffers,
perhaps you should be asking the question on the X server mailing lists.

Thanks.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to change endian attribute for a memory region
@ 2002-10-15 16:40 Ralph Blach
  0 siblings, 0 replies; 13+ messages in thread
From: Ralph Blach @ 2002-10-15 16:40 UTC (permalink / raw
  To: Laurent Mohin; +Cc: linuxppc-embedded


No has written an IOremap_LE.

Chip


"Laurent Mohin" <laurent.mohin@acterna.com>@lists.linuxppc.org on
10/15/2002 11:00:02 AM

Sent by:    owner-linuxppc-embedded@lists.linuxppc.org


To:    Ralph Blach/Raleigh/IBM@IBMUS
cc:    Matt Porter <porter@cox.net>, linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




Ralph,

That was the purpose of my question. Has anybody written this IOremap_LE
function?

Laurent




"Ralph Blach" <rcblach@us.ibm.com> on 15/10/2002 16:34:14

To:    Matt Porter <porter@cox.net>
cc:    linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




OK, I know this is absolute HERESY  for all you out there, and would never
be supported in the kernel tree,
and probably with very good reasons, but I'll mention it anyway.

ON the 405 and the 440 class processors, there is an endian bit in the TLB
which would make a 4k region
little endian.  To use this bit one would have to write an IOremap_LE and
support the bit in the page table,
but it could be used.

There are probabley better ways that are more inline with the PPC
philosophy.

Chip



Matt Porter <porter@cox.net>@lists.linuxppc.org on 10/15/2002 10:15:46 AM

Sent by:    owner-linuxppc-embedded@lists.linuxppc.org


To:    Laurent Mohin <laurent.mohin@acterna.com>
cc:    Stefan Roese <stefan.roese@esd-electronics.com>, Michael Meriin
       <Michael@KSWaves.com>, linuxppc-embedded@lists.linuxppc.org
Subject:    Re: How to change endian attribute for a memory region




On Tue, Oct 15, 2002 at 01:07:19PM +0200, Laurent Mohin wrote:
>
> Stefan,
>
> I'm the initiator of the question.
> I use the Epson chip in big endian mode. The problem is that in 16 bpp
> mode, the RGB mapping into video memory is fixed by the chip and
described
> in little endian format.
>
> By the way, I really studied the chip and if I want to be able to manage
> both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> attribute of the memory region.

Why wouldn't you access video memory via a sthbrx instruction (writew)?

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-10-15 16:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-15  8:42 How to change endian attribute for a memory region Laurent Mohin
2002-10-14  8:57 ` Michael Meriin
  -- strict thread matches above, loose matches on Subject: below --
2002-10-15  9:08 Laurent Mohin
2002-10-15  9:55 ` Stefan Roese
2002-10-14 10:18   ` Michael Meriin
2002-10-15 11:07 Laurent Mohin
2002-10-15 14:15 ` Matt Porter
2002-10-15 14:35   ` Allen Curtis
2002-10-15 14:34 Ralph Blach
2002-10-15 14:57 Laurent Mohin
2002-10-15 15:00 Laurent Mohin
2002-10-15 15:45 ` Dan Malek
2002-10-15 16:40 Ralph Blach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.