* How to do IO mapped Implimentation ???
@ 2007-12-28 5:12 Misbah khan
2007-12-28 17:35 ` Jeyner Gil Caga
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Misbah khan @ 2007-12-28 5:12 UTC (permalink / raw)
To: linuxppc-embedded
Hi all...
I am writing a driver in which device port is mapped to CPLD and 8 bit data
bus is directly connected from processor to CPLD. Read write on CPLD memory
mapped (buffer/register) is required to control the device. This is now IO
mapped to processor.
I need to know whether i am right if i impliment like this :-
addr=ioremap(base_addr); // Remap to Mem mapped address
outb(addr) and inb(addr);
Please suggest me if i am wrong or there could be better solution to this .
-----Misbah <><
--
View this message in context: http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14522349.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-28 5:12 How to do IO mapped Implimentation ??? Misbah khan
@ 2007-12-28 17:35 ` Jeyner Gil Caga
2007-12-31 6:46 ` Misbah khan
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Jeyner Gil Caga @ 2007-12-28 17:35 UTC (permalink / raw)
To: Misbah khan, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
Hi Misbah,
If I am not mistaken, ioremap takes 2 parameters,
ioremap(base_addr,size_to_remap). i have tried out_8() and in_8() to issue
the command.
Regards,
gil
On 12/28/07, Misbah khan <misbah_khan@engineer.com> wrote:
>
>
> Hi all...
>
> I am writing a driver in which device port is mapped to CPLD and 8 bit
> data
> bus is directly connected from processor to CPLD. Read write on CPLD
> memory
> mapped (buffer/register) is required to control the device. This is now IO
> mapped to processor.
>
> I need to know whether i am right if i impliment like this :-
> addr=ioremap(base_addr); // Remap to Mem mapped address
> outb(addr) and inb(addr);
>
> Please suggest me if i am wrong or there could be better solution to this
> .
>
> -----Misbah <><
>
> --
> View this message in context:
> http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14522349.html
> Sent from the linuxppc-embedded mailing list archive at Nabble.com.
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 1922 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-28 5:12 How to do IO mapped Implimentation ??? Misbah khan
2007-12-28 17:35 ` Jeyner Gil Caga
@ 2007-12-31 6:46 ` Misbah khan
2007-12-31 8:09 ` Jeyner Gil Caga
2007-12-31 10:02 ` Misbah khan
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Misbah khan @ 2007-12-31 6:46 UTC (permalink / raw)
To: linuxppc-embedded
yes with respect to ioremap() its right ...i just missed the secound argument
....
in_8() and out_8() will work fine or i need to use in_be8() and out_be8() on
PPC architecture ????
---Misbah<><
Misbah khan wrote:
>
> Hi all...
>
> I am writing a driver in which device port is mapped to CPLD and 8 bit
> data bus is directly connected from processor to CPLD. Read write on CPLD
> memory mapped (buffer/register) is required to control the device. This is
> now IO mapped to processor.
>
> I need to know whether i am right if i impliment like this :-
> addr=ioremap(base_addr); // Remap to Mem mapped address
> outb(addr) and inb(addr);
>
> Please suggest me if i am wrong or there could be better solution to this
> .
>
> -----Misbah <><
>
>
--
View this message in context: http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14554843.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-31 6:46 ` Misbah khan
@ 2007-12-31 8:09 ` Jeyner Gil Caga
0 siblings, 0 replies; 9+ messages in thread
From: Jeyner Gil Caga @ 2007-12-31 8:09 UTC (permalink / raw)
To: Misbah khan, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
In ppc440 epx, I couldn't find any in_be8() or out_be8(), so I just use
in_8() and out_8().
gil
On 12/31/07, Misbah khan <misbah_khan@engineer.com> wrote:
>
>
> yes with respect to ioremap() its right ...i just missed the secound
> argument
> ....
>
> in_8() and out_8() will work fine or i need to use in_be8() and out_be8()
> on
> PPC architecture ????
>
> ---Misbah<><
>
>
> Misbah khan wrote:
> >
> > Hi all...
> >
> > I am writing a driver in which device port is mapped to CPLD and 8 bit
> > data bus is directly connected from processor to CPLD. Read write on
> CPLD
> > memory mapped (buffer/register) is required to control the device. This
> is
> > now IO mapped to processor.
> >
> > I need to know whether i am right if i impliment like this :-
> > addr=ioremap(base_addr); // Remap to Mem mapped
> address
> > outb(addr) and inb(addr);
> >
> > Please suggest me if i am wrong or there could be better solution to
> this
> > .
> >
> > -----Misbah <><
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14554843.html
> Sent from the linuxppc-embedded mailing list archive at Nabble.com.
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 2204 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-28 5:12 How to do IO mapped Implimentation ??? Misbah khan
2007-12-28 17:35 ` Jeyner Gil Caga
2007-12-31 6:46 ` Misbah khan
@ 2007-12-31 10:02 ` Misbah khan
2007-12-31 11:57 ` Jeyner Gil Caga
2007-12-31 12:44 ` Misbah khan
2008-01-02 9:18 ` Misbah khan
4 siblings, 1 reply; 9+ messages in thread
From: Misbah khan @ 2007-12-31 10:02 UTC (permalink / raw)
To: linuxppc-embedded
I have used in_be32() and out_be32() for ppc8248 in one of my driver for FPGA
in which the fpga memory is mapped here it is Io mapped thats the only
difference ....remapping and using in_8() and out_8() will it work for
BigEndian arch ????
-----Misbah <><
Misbah khan wrote:
>
> Hi all...
>
> I am writing a driver in which device port is mapped to CPLD and 8 bit
> data bus is directly connected from processor to CPLD. Read write on CPLD
> memory mapped (buffer/register) is required to control the device. This is
> now IO mapped to processor.
>
> I need to know whether i am right if i impliment like this :-
> addr=ioremap(base_addr); // Remap to Mem mapped address
> outb(addr) and inb(addr);
>
> Please suggest me if i am wrong or there could be better solution to this
> .
>
> -----Misbah <><
>
>
--
View this message in context: http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14555864.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-31 10:02 ` Misbah khan
@ 2007-12-31 11:57 ` Jeyner Gil Caga
0 siblings, 0 replies; 9+ messages in thread
From: Jeyner Gil Caga @ 2007-12-31 11:57 UTC (permalink / raw)
To: Misbah khan, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
Hmmm, I have not touched ppc8248 before, but I guess it will work since it
is only 1 byte, not 2 or 4 byte access. I have used it in ppc 440epx, and
that eval board is big endian as well.
On 12/31/07, Misbah khan <misbah_khan@engineer.com> wrote:
>
>
> I have used in_be32() and out_be32() for ppc8248 in one of my driver for
> FPGA
> in which the fpga memory is mapped here it is Io mapped thats the only
> difference ....remapping and using in_8() and out_8() will it work for
> BigEndian arch ????
>
> -----Misbah <><
>
>
> Misbah khan wrote:
> >
> > Hi all...
> >
> > I am writing a driver in which device port is mapped to CPLD and 8 bit
> > data bus is directly connected from processor to CPLD. Read write on
> CPLD
> > memory mapped (buffer/register) is required to control the device. This
> is
> > now IO mapped to processor.
> >
> > I need to know whether i am right if i impliment like this :-
> > addr=ioremap(base_addr); // Remap to Mem mapped
> address
> > outb(addr) and inb(addr);
> >
> > Please suggest me if i am wrong or there could be better solution to
> this
> > .
> >
> > -----Misbah <><
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14555864.html
> Sent from the linuxppc-embedded mailing list archive at Nabble.com.
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 2291 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-28 5:12 How to do IO mapped Implimentation ??? Misbah khan
` (2 preceding siblings ...)
2007-12-31 10:02 ` Misbah khan
@ 2007-12-31 12:44 ` Misbah khan
2007-12-31 14:43 ` Jeyner Gil Caga
2008-01-02 9:18 ` Misbah khan
4 siblings, 1 reply; 9+ messages in thread
From: Misbah khan @ 2007-12-31 12:44 UTC (permalink / raw)
To: linuxppc-embedded
You are absolutly right and i guess it will certainly work for 8248 as well ,
but the only concern is that " here in mine case the register is not memory
mapped where as its IO mapped " we have to consider the memory as IO port
and then access the data ....
What you have used i guess its memory mapped ...Is it that accessing memory
mapped is same as io mapped ?????
---Misbah
Misbah khan wrote:
>
> Hi all...
>
> I am writing a driver in which device port is mapped to CPLD and 8 bit
> data bus is directly connected from processor to CPLD. Read write on CPLD
> memory mapped (buffer/register) is required to control the device. This is
> now IO mapped to processor.
>
> I need to know whether i am right if i impliment like this :-
> addr=ioremap(base_addr); // Remap to Mem mapped address
> outb(addr) and inb(addr);
>
> Please suggest me if i am wrong or there could be better solution to this
> .
>
> -----Misbah <><
>
>
--
View this message in context: http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14557204.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-31 12:44 ` Misbah khan
@ 2007-12-31 14:43 ` Jeyner Gil Caga
0 siblings, 0 replies; 9+ messages in thread
From: Jeyner Gil Caga @ 2007-12-31 14:43 UTC (permalink / raw)
To: Misbah khan, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
Oh, I just missed the io mapped in your previous email. Unfortunately, my
experience is only limited to memory map. I think they should be the same.
On 12/31/07, Misbah khan <misbah_khan@engineer.com> wrote:
>
>
> You are absolutly right and i guess it will certainly work for 8248 as
> well ,
> but the only concern is that " here in mine case the register is not
> memory
> mapped where as its IO mapped " we have to consider the memory as IO port
> and then access the data ....
>
> What you have used i guess its memory mapped ...Is it that accessing
> memory
> mapped is same as io mapped ?????
>
>
> ---Misbah
>
> Misbah khan wrote:
> >
> > Hi all...
> >
> > I am writing a driver in which device port is mapped to CPLD and 8 bit
> > data bus is directly connected from processor to CPLD. Read write on
> CPLD
> > memory mapped (buffer/register) is required to control the device. This
> is
> > now IO mapped to processor.
> >
> > I need to know whether i am right if i impliment like this :-
> > addr=ioremap(base_addr); // Remap to Mem mapped
> address
> > outb(addr) and inb(addr);
> >
> > Please suggest me if i am wrong or there could be better solution to
> this
> > .
> >
> > -----Misbah <><
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14557204.html
> Sent from the linuxppc-embedded mailing list archive at Nabble.com.
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: Type: text/html, Size: 2386 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to do IO mapped Implimentation ???
2007-12-28 5:12 How to do IO mapped Implimentation ??? Misbah khan
` (3 preceding siblings ...)
2007-12-31 12:44 ` Misbah khan
@ 2008-01-02 9:18 ` Misbah khan
4 siblings, 0 replies; 9+ messages in thread
From: Misbah khan @ 2008-01-02 9:18 UTC (permalink / raw)
To: linuxppc-embedded
Till now i assume that Io mapped and memory mapped Implimentation are same
...the biggest doubt is How the two would remain the same ....If any of you
have worked on it Please share your experience with me ....
Misbah khan wrote:
>
> Hi all...
>
> I am writing a driver in which device port is mapped to CPLD and 8 bit
> data bus is directly connected from processor to CPLD. Read write on CPLD
> memory mapped (buffer/register) is required to control the device. This is
> now IO mapped to processor.
>
> I need to know whether i am right if i impliment like this :-
> addr=ioremap(base_addr); // Remap to Mem mapped address
> outb(addr) and inb(addr);
>
> Please suggest me if i am wrong or there could be better solution to this
> .
>
> -----Misbah <><
>
>
--
View this message in context: http://www.nabble.com/How-to-do-IO-mapped-Implimentation-----tp14522349p14575369.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-01-02 9:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-28 5:12 How to do IO mapped Implimentation ??? Misbah khan
2007-12-28 17:35 ` Jeyner Gil Caga
2007-12-31 6:46 ` Misbah khan
2007-12-31 8:09 ` Jeyner Gil Caga
2007-12-31 10:02 ` Misbah khan
2007-12-31 11:57 ` Jeyner Gil Caga
2007-12-31 12:44 ` Misbah khan
2007-12-31 14:43 ` Jeyner Gil Caga
2008-01-02 9:18 ` Misbah khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).