* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
@ 2010-02-04 9:21 Dennis Semakin
2010-02-04 12:28 ` Eric Miao
2010-02-05 4:26 ` Daniel Mack
0 siblings, 2 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-04 9:21 UTC (permalink / raw)
To: linux-arm-kernel
Hello all
Configuration:
Computer module is Toradex Colibri PXA320.
Board is Colibri Evaluation Board.
Obviously, to access the I/O register of network card, we need to map them into memory, using the ioremap() function.
To do this driver (ax88796.c) use platform_get_resource() function to get the physical address of the I/O registers from the board definition (arch/arm/mach-pxa/colibri-pxa320.c). This function returns a pointer to a struct resource, which contains two interesting fields : start and end (both are physical address).
Then call ioremap function to remap the memory area returned by platform_get_resource.
Right?
Ok. When I start kernel on my board, kernel loading stops on network initialization during call to the address resource.start.
So, what could I do if the address (field start in resource structure) is not valid?
Can I find it? (I mean address) Maybe I should ask something: where are ethernet chip I/O registers mapped in the memory?
Thanks
Best regards
Dennis Semakin
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-04 9:21 [PXA320] How to find I/O registers, base address of ASIX ethernet chip? Dennis Semakin
@ 2010-02-04 12:28 ` Eric Miao
2010-02-04 13:09 ` Dennis Semakin
` (2 more replies)
2010-02-05 4:26 ` Daniel Mack
1 sibling, 3 replies; 23+ messages in thread
From: Eric Miao @ 2010-02-04 12:28 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 4, 2010 at 1:21 AM, Dennis Semakin <insane79@yandex.ru> wrote:
> Hello all
>
> Configuration:
> Computer module is Toradex Colibri PXA320.
> Board is Colibri Evaluation Board.
>
> Obviously, to access the I/O register of network card, we need to map them into memory, using the ioremap() function.
> To do this driver (ax88796.c) use platform_get_resource() function to get the physical address of the I/O registers from the board definition (arch/arm/mach-pxa/colibri-pxa320.c). This function returns a pointer to a struct resource, which contains two interesting fields : start and end (both are physical address).
> Then call ioremap function to remap the memory area returned by platform_get_resource.
> Right?
>
> Ok. When I start kernel on my board, kernel loading stops on network initialization during call to the address resource.start.
By 'call', my understanding is 'access' here right?
> So, what could I do if the address (field start in resource structure) is not valid?
> Can I find it? (I mean address) Maybe I should ask something: where are ethernet chip I/O registers mapped in the memory?
>
Well, I guess you have to ask Toradex then :-)
Sometimes the registers range is offset by some value, possibly due
to compatibility with ISA I/O range, so you can also check if you have
a correct offset there in the resource definitions.
^ permalink raw reply [flat|nested] 23+ messages in thread* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-04 9:21 [PXA320] How to find I/O registers, base address of ASIX ethernet chip? Dennis Semakin
2010-02-04 12:28 ` Eric Miao
@ 2010-02-05 4:26 ` Daniel Mack
2010-02-05 7:53 ` Uwe Kleine-König
2010-02-05 8:02 ` Dennis Semakin
1 sibling, 2 replies; 23+ messages in thread
From: Daniel Mack @ 2010-02-05 4:26 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 04, 2010 at 12:21:40PM +0300, Dennis Semakin wrote:
> Configuration:
> Computer module is Toradex Colibri PXA320.
> Board is Colibri Evaluation Board.
>
> Obviously, to access the I/O register of network card, we need to map them into memory, using the ioremap() function.
> To do this driver (ax88796.c) use platform_get_resource() function to get the physical address of the I/O registers from the board definition (arch/arm/mach-pxa/colibri-pxa320.c). This function returns a pointer to a struct resource, which contains two interesting fields : start and end (both are physical address).
> Then call ioremap function to remap the memory area returned by platform_get_resource.
> Right?
>
> Ok. When I start kernel on my board, kernel loading stops on network initialization during call to the address resource.start.
> So, what could I do if the address (field start in resource structure) is not valid?
> Can I find it? (I mean address) Maybe I should ask something: where are ethernet chip I/O registers mapped in the memory?
The addresses passed to the driver is the I/O area of the chip select
signal used for the Ethernet chip. This setting should be alright, as it
worked well for me.
If your kernel hangs when accessing this area, you most probably haven't
set up your static bus correctly. The bootloader is in charge of doing
this, and the correct value for CSADRCFG2 is 0x0032C809.
Also see http://openpxa.sourceforge.net/ for patches to U-Boot and more
information about replacing the native bootloader the modules ships
with.
Daniel
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-05 4:26 ` Daniel Mack
@ 2010-02-05 7:53 ` Uwe Kleine-König
2010-02-07 5:11 ` Daniel Mack
2010-02-05 8:02 ` Dennis Semakin
1 sibling, 1 reply; 23+ messages in thread
From: Uwe Kleine-König @ 2010-02-05 7:53 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
On Fri, Feb 05, 2010 at 05:26:55AM +0100, Daniel Mack wrote:
> On Thu, Feb 04, 2010 at 12:21:40PM +0300, Dennis Semakin wrote:
> > Configuration:
> > Computer module is Toradex Colibri PXA320.
> > Board is Colibri Evaluation Board.
> >
> > Obviously, to access the I/O register of network card, we need to map them into memory, using the ioremap() function.
> > To do this driver (ax88796.c) use platform_get_resource() function to get the physical address of the I/O registers from the board definition (arch/arm/mach-pxa/colibri-pxa320.c). This function returns a pointer to a struct resource, which contains two interesting fields : start and end (both are physical address).
> > Then call ioremap function to remap the memory area returned by platform_get_resource.
> > Right?
> >
> > Ok. When I start kernel on my board, kernel loading stops on network initialization during call to the address resource.start.
> > So, what could I do if the address (field start in resource structure) is not valid?
> > Can I find it? (I mean address) Maybe I should ask something: where are ethernet chip I/O registers mapped in the memory?
>
> The addresses passed to the driver is the I/O area of the chip select
> signal used for the Ethernet chip. This setting should be alright, as it
> worked well for me.
>
> If your kernel hangs when accessing this area, you most probably haven't
> set up your static bus correctly. The bootloader is in charge of doing
> this, and the correct value for CSADRCFG2 is 0x0032C809.
I would prefer if Linux didn't rely on the boot loader for that. It's
not expensive or difficult to set this register in machine setup code,
is it?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-05 7:53 ` Uwe Kleine-König
@ 2010-02-07 5:11 ` Daniel Mack
2010-02-08 6:06 ` Eric Miao
0 siblings, 1 reply; 23+ messages in thread
From: Daniel Mack @ 2010-02-07 5:11 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 05, 2010 at 08:53:38AM +0100, Uwe Kleine-K?nig wrote:
> On Fri, Feb 05, 2010 at 05:26:55AM +0100, Daniel Mack wrote:
> > The addresses passed to the driver is the I/O area of the chip select
> > signal used for the Ethernet chip. This setting should be alright, as it
> > worked well for me.
> >
> > If your kernel hangs when accessing this area, you most probably haven't
> > set up your static bus correctly. The bootloader is in charge of doing
> > this, and the correct value for CSADRCFG2 is 0x0032C809.
> I would prefer if Linux didn't rely on the boot loader for that. It's
> not expensive or difficult to set this register in machine setup code,
> is it?
>
The boarsds I've been working on need to set this register from the
bootloader anyway they use Ethernet for TFTP downloads. But you're
right, in general, there should be a way to set such registers from
kernel space as well. Eric, any such plans?
Daniel
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-07 5:11 ` Daniel Mack
@ 2010-02-08 6:06 ` Eric Miao
0 siblings, 0 replies; 23+ messages in thread
From: Eric Miao @ 2010-02-08 6:06 UTC (permalink / raw)
To: linux-arm-kernel
2010/2/7 Daniel Mack <daniel@caiaq.de>:
> On Fri, Feb 05, 2010 at 08:53:38AM +0100, Uwe Kleine-K?nig wrote:
>> On Fri, Feb 05, 2010 at 05:26:55AM +0100, Daniel Mack wrote:
>> > The addresses passed to the driver is the I/O area of the chip select
>> > signal used for the Ethernet chip. This setting should be alright, as it
>> > worked well for me.
>> >
>> > If your kernel hangs when accessing this area, you most probably haven't
>> > set up your static bus correctly. The bootloader is in charge of doing
>> > this, and the correct value for CSADRCFG2 is 0x0032C809.
>> I would prefer if Linux didn't rely on the boot loader for that. ?It's
>> not expensive or difficult to set this register in machine setup code,
>> is it?
>>
>
> The boarsds I've been working on need to set this register from the
> bootloader anyway they use Ethernet for TFTP downloads. But you're
> right, in general, there should be a way to set such registers from
> kernel space as well. Eric, any such plans?
>
I think so, the setting of CSADRCFGx and others is really something
like SMEMC initialization, provided we have a smemc.c, we might be
able to have something generic there.
> Daniel
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-05 4:26 ` Daniel Mack
2010-02-05 7:53 ` Uwe Kleine-König
@ 2010-02-05 8:02 ` Dennis Semakin
2010-02-07 5:13 ` Daniel Mack
2010-02-07 6:53 ` Mike Rapoport
1 sibling, 2 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-05 8:02 UTC (permalink / raw)
To: linux-arm-kernel
Hello
I use u-boot.
>
> The addresses passed to the driver is the I/O area of the chip select
> signal used for the Ethernet chip. This setting should be alright, as it
> worked well for me.
>
> If your kernel hangs when accessing this area, you most probably haven't
> set up your static bus correctly. The bootloader is in charge of doing
> this, and the correct value for CSADRCFG2 is 0x0032C809.
>
> Also see http://openpxa.sourceforge.net/ for patches to U-Boot and more
> information about replacing the native bootloader the modules ships
> with.
>
> Daniel
>
In U-BOOT:
MSC1 (address 0x4a00000c) - 0x0779
$ md.w 0x4a00000c
4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
CSADRCFG2 (address 0x4a000088) - 0032c809
$ md.l 0x4a000088
4a000088: 0032c809 00020000 00020000 00000000 ..2.............
4a000098: 00000000 00000000 00000000 00000000 ................
4a0000a8: 00000000 00000000 00000000 00000000 ................
4a0000b8: 00000000 00000000 00000000 00000000 ................
4a0000c8: 00000000 00000000 00000000 00000000 ................
As I think everythig is right and corresponds to a code
int board_init (void)
{
/* arch number for linux kernel */
gd->bd->bi_arch_number = MACH_TYPE_COLIBRI320;
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x80000100;
/* configuration for ethernet chip */
CKENB |= CKENB_7_GPIO;
GPIO3 = 0x00001c01;
MSC1 = 0x779;
CSADRCFG2 = 0x0032C809;
return 0;
}
Thanks
Best regards
Dennis Semakin
^ permalink raw reply [flat|nested] 23+ messages in thread* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-05 8:02 ` Dennis Semakin
@ 2010-02-07 5:13 ` Daniel Mack
2010-02-08 8:58 ` Dennis Semakin
2010-02-08 8:59 ` Dennis Semakin
2010-02-07 6:53 ` Mike Rapoport
1 sibling, 2 replies; 23+ messages in thread
From: Daniel Mack @ 2010-02-07 5:13 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 05, 2010 at 11:02:10AM +0300, Dennis Semakin wrote:
> > The addresses passed to the driver is the I/O area of the chip select
> > signal used for the Ethernet chip. This setting should be alright, as it
> > worked well for me.
> >
> > If your kernel hangs when accessing this area, you most probably haven't
> > set up your static bus correctly. The bootloader is in charge of doing
> > this, and the correct value for CSADRCFG2 is 0x0032C809.
> >
> > Also see http://openpxa.sourceforge.net/ for patches to U-Boot and more
> > information about replacing the native bootloader the modules ships
> > with.
> >
> > Daniel
> >
>
> In U-BOOT:
>
> MSC1 (address 0x4a00000c) - 0x0779
> $ md.w 0x4a00000c
> 4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
> 4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
> 4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
>
> CSADRCFG2 (address 0x4a000088) - 0032c809
> $ md.l 0x4a000088
> 4a000088: 0032c809 00020000 00020000 00000000 ..2.............
> 4a000098: 00000000 00000000 00000000 00000000 ................
> 4a0000a8: 00000000 00000000 00000000 00000000 ................
> 4a0000b8: 00000000 00000000 00000000 00000000 ................
> 4a0000c8: 00000000 00000000 00000000 00000000 ................
Can you access 0x1000_0000 from U-Boot? Did you switch on the clock for
the static bus? This is also not done by the kernel currently.
Daniel
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-07 5:13 ` Daniel Mack
@ 2010-02-08 8:58 ` Dennis Semakin
2010-02-08 8:59 ` Dennis Semakin
1 sibling, 0 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 8:58 UTC (permalink / raw)
To: linux-arm-kernel
Hello
> > In U-BOOT:
> >
> > MSC1 (address 0x4a00000c) - 0x0779
> > $ md.w 0x4a00000c
> > 4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
> > 4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
> > 4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> > 4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> >
> > CSADRCFG2 (address 0x4a000088) - 0032c809
> > $ md.l 0x4a000088
> > 4a000088: 0032c809 00020000 00020000 00000000 ..2.............
> > 4a000098: 00000000 00000000 00000000 00000000 ................
> > 4a0000a8: 00000000 00000000 00000000 00000000 ................
> > 4a0000b8: 00000000 00000000 00000000 00000000 ................
> > 4a0000c8: 00000000 00000000 00000000 00000000 ................
>
> Can you access 0x1000_0000 from U-Boot? Did you switch on the clock for
> the static bus? This is also not done by the kernel currently.
>
> Daniel
>
>
No, I cannot access 0x1000_0000 from U-Boot. The system hangs, when I access to this address
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-07 5:13 ` Daniel Mack
2010-02-08 8:58 ` Dennis Semakin
@ 2010-02-08 8:59 ` Dennis Semakin
2010-02-08 9:13 ` Uwe Kleine-König
1 sibling, 1 reply; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 8:59 UTC (permalink / raw)
To: linux-arm-kernel
Hello
> > In U-BOOT:
> >
> > MSC1 (address 0x4a00000c) - 0x0779
> > $ md.w 0x4a00000c
> > 4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
> > 4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
> > 4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> > 4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> >
> > CSADRCFG2 (address 0x4a000088) - 0032c809
> > $ md.l 0x4a000088
> > 4a000088: 0032c809 00020000 00020000 00000000 ..2.............
> > 4a000098: 00000000 00000000 00000000 00000000 ................
> > 4a0000a8: 00000000 00000000 00000000 00000000 ................
> > 4a0000b8: 00000000 00000000 00000000 00000000 ................
> > 4a0000c8: 00000000 00000000 00000000 00000000 ................
>
> Can you access 0x1000_0000 from U-Boot? Did you switch on the clock for
> the static bus? This is also not done by the kernel currently.
>
> Daniel
>
>
No, I cannot access 0x1000_0000 from U-Boot. The system hangs, when I access to this address
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 8:59 ` Dennis Semakin
@ 2010-02-08 9:13 ` Uwe Kleine-König
2010-02-08 9:31 ` Dennis Semakin
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2010-02-08 9:13 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 08, 2010 at 11:59:20AM +0300, Dennis Semakin wrote:
> Hello
>
> > > In U-BOOT:
> > >
> > > MSC1 (address 0x4a00000c) - 0x0779
> > > $ md.w 0x4a00000c
> > > 4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
> > > 4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
> > > 4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> > > 4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> > >
> > > CSADRCFG2 (address 0x4a000088) - 0032c809
> > > $ md.l 0x4a000088
> > > 4a000088: 0032c809 00020000 00020000 00000000 ..2.............
> > > 4a000098: 00000000 00000000 00000000 00000000 ................
> > > 4a0000a8: 00000000 00000000 00000000 00000000 ................
> > > 4a0000b8: 00000000 00000000 00000000 00000000 ................
> > > 4a0000c8: 00000000 00000000 00000000 00000000 ................
> >
> > Can you access 0x1000_0000 from U-Boot? Did you switch on the clock for
> > the static bus? This is also not done by the kernel currently.
> >
> > Daniel
> >
> >
>
> No, I cannot access 0x1000_0000 from U-Boot. The system hangs, when I access to this address
This sounds like a missing clock. Ah, and Daniel already asked that,
too: "Did you switch on the clock for the static bus?"
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 23+ messages in thread* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 9:13 ` Uwe Kleine-König
@ 2010-02-08 9:31 ` Dennis Semakin
2010-02-08 9:38 ` Dennis Semakin
2010-02-08 9:57 ` Dennis Semakin
2 siblings, 0 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 9:31 UTC (permalink / raw)
To: linux-arm-kernel
Hello
> > No, I cannot access 0x1000_0000 from U-Boot. The system hangs, when I access to this address
> This sounds like a missing clock. Ah, and Daniel already asked that,
> too: "Did you switch on the clock for the static bus?"
>
Well... I yet do not know to do this... :(
Thanks
Best regards
Dennis Semakin
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 9:13 ` Uwe Kleine-König
2010-02-08 9:31 ` Dennis Semakin
@ 2010-02-08 9:38 ` Dennis Semakin
2010-02-08 10:15 ` Daniel Mack
2010-02-08 9:57 ` Dennis Semakin
2 siblings, 1 reply; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 9:38 UTC (permalink / raw)
To: linux-arm-kernel
08.02.10, 10:13, "Uwe Kleine-K?nig" <u.kleine-koenig@pengutronix.de>:
> On Mon, Feb 08, 2010 at 11:59:20AM +0300, Dennis Semakin wrote:
> > Hello
> >
> > > > In U-BOOT:
> > > >
> > > > MSC1 (address 0x4a00000c) - 0x0779
> > > > $ md.w 0x4a00000c
> > > > 4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
> > > > 4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
> > > > 4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> > > > 4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> > > >
> > > > CSADRCFG2 (address 0x4a000088) - 0032c809
> > > > $ md.l 0x4a000088
> > > > 4a000088: 0032c809 00020000 00020000 00000000 ..2.............
> > > > 4a000098: 00000000 00000000 00000000 00000000 ................
> > > > 4a0000a8: 00000000 00000000 00000000 00000000 ................
> > > > 4a0000b8: 00000000 00000000 00000000 00000000 ................
> > > > 4a0000c8: 00000000 00000000 00000000 00000000 ................
> > >
> > > Can you access 0x1000_0000 from U-Boot? Did you switch on the clock for
> > > the static bus? This is also not done by the kernel currently.
> > >
> > > Daniel
> > >
> > >
> >
> > No, I cannot access 0x1000_0000 from U-Boot. The system hangs, when I access to this address
> This sounds like a missing clock. Ah, and Daniel already asked that,
> too: "Did you switch on the clock for the static bus?"
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-K?nig |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
>
>
Well... I yet do not know how to do this...
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 9:38 ` Dennis Semakin
@ 2010-02-08 10:15 ` Daniel Mack
2010-02-08 12:16 ` Dennis Semakin
2010-02-08 12:16 ` Dennis Semakin
0 siblings, 2 replies; 23+ messages in thread
From: Daniel Mack @ 2010-02-08 10:15 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 08, 2010 at 12:38:06PM +0300, Dennis Semakin wrote:
> 08.02.10, 10:13, "Uwe Kleine-K?nig" <u.kleine-koenig@pengutronix.de>:
> > This sounds like a missing clock. Ah, and Daniel already asked that,
> > too: "Did you switch on the clock for the static bus?"
> >
>
> Well... I yet do not know how to do this...
Try adding this sniplet to your lowlevel_init function in U-Boot:
/* enable clocks for NAND and static memory */
ldr r0, =CKENA
ldr r1, [r0]
orr r1, r1, #(CKENA_4_NAND | CKENA_9_SMC)
str r1, [r0]
ldr r1, [r0]
Daniel
^ permalink raw reply [flat|nested] 23+ messages in thread* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 10:15 ` Daniel Mack
@ 2010-02-08 12:16 ` Dennis Semakin
2010-02-08 12:49 ` Daniel Mack
2010-02-08 12:16 ` Dennis Semakin
1 sibling, 1 reply; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 12:16 UTC (permalink / raw)
To: linux-arm-kernel
Dear Daniel
Thank you very much for code. It works fine.
If you will be in Moscow, I'll buy you a pints of beer :)
It is necessary to ask only: why in u-boot git-repository I didn't see this code?
08.02.10, 11:15, "Daniel Mack" <daniel@caiaq.de>:
> On Mon, Feb 08, 2010 at 12:38:06PM +0300, Dennis Semakin wrote:
> > 08.02.10, 10:13, "Uwe Kleine-K?nig" :
> > > This sounds like a missing clock. Ah, and Daniel already asked that,
> > > too: "Did you switch on the clock for the static bus?"
> > >
> >
> > Well... I yet do not know how to do this...
>
> Try adding this sniplet to your lowlevel_init function in U-Boot:
>
> /* enable clocks for NAND and static memory */
> ldr r0, =CKENA
> ldr r1, [r0]
> orr r1, r1, #(CKENA_4_NAND | CKENA_9_SMC)
> str r1, [r0]
> ldr r1, [r0]
>
> Daniel
>
Thanks
Best regards
Dennis Semakin
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 12:16 ` Dennis Semakin
@ 2010-02-08 12:49 ` Daniel Mack
2010-02-08 14:13 ` Dennis Semakin
0 siblings, 1 reply; 23+ messages in thread
From: Daniel Mack @ 2010-02-08 12:49 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 08, 2010 at 03:16:12PM +0300, Dennis Semakin wrote:
> It is necessary to ask only: why in u-boot git-repository I didn't see this code?
It did see this code, but it wasn't taken for upstream, for reasons I
cannot remember.
You should have a look at the openpxa patches provided by Marek and see
if they work for you. If they don't, help fixing them.
Best regards,
Daniel
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 12:49 ` Daniel Mack
@ 2010-02-08 14:13 ` Dennis Semakin
0 siblings, 0 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 14:13 UTC (permalink / raw)
To: linux-arm-kernel
> It did see this code, but it wasn't taken for upstream, for reasons I
> cannot remember.
>
> You should have a look at the openpxa patches provided by Marek and see
> if they work for you. If they don't, help fixing them.
>
> Best regards,
> Daniel
Daniel,
I applied all patches from Marek's web site (openpxa). But net works only with your addings.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 10:15 ` Daniel Mack
2010-02-08 12:16 ` Dennis Semakin
@ 2010-02-08 12:16 ` Dennis Semakin
1 sibling, 0 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 12:16 UTC (permalink / raw)
To: linux-arm-kernel
Dear Daniel
Thank you very much for code. It works fine.
If you will be in Moscow, I'll buy you a pints of beer :)
It is necessary to ask only: why in u-boot git-repository I didn't see this code?
08.02.10, 11:15, "Daniel Mack" <daniel@caiaq.de>:
> On Mon, Feb 08, 2010 at 12:38:06PM +0300, Dennis Semakin wrote:
> > 08.02.10, 10:13, "Uwe Kleine-K?nig" :
> > > This sounds like a missing clock. Ah, and Daniel already asked that,
> > > too: "Did you switch on the clock for the static bus?"
> > >
> >
> > Well... I yet do not know how to do this...
>
> Try adding this sniplet to your lowlevel_init function in U-Boot:
>
> /* enable clocks for NAND and static memory */
> ldr r0, =CKENA
> ldr r1, [r0]
> orr r1, r1, #(CKENA_4_NAND | CKENA_9_SMC)
> str r1, [r0]
> ldr r1, [r0]
>
> Daniel
>
Thanks
Best regards
Dennis Semakin
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-08 9:13 ` Uwe Kleine-König
2010-02-08 9:31 ` Dennis Semakin
2010-02-08 9:38 ` Dennis Semakin
@ 2010-02-08 9:57 ` Dennis Semakin
2 siblings, 0 replies; 23+ messages in thread
From: Dennis Semakin @ 2010-02-08 9:57 UTC (permalink / raw)
To: linux-arm-kernel
> > No, I cannot access 0x1000_0000 from U-Boot. The system hangs, when I access to this address
> This sounds like a missing clock. Ah, and Daniel already asked that,
> too: "Did you switch on the clock for the static bus?"
>
If you asked about Clock Configuration Register (MEMCLKCGF), then
Its value is 0x30003.
In U-Boot:
$ md.l 0x4a000068
4a000068: 00030003 00000000 00000000 00000000 ................
4a000078: 00000000 00000000 00020000 00020000 ................
How else can I switch on the clock for the static bus?
Thanks
Best regards
Dennis Semakin
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PXA320] How to find I/O registers, base address of ASIX ethernet chip?
2010-02-05 8:02 ` Dennis Semakin
2010-02-07 5:13 ` Daniel Mack
@ 2010-02-07 6:53 ` Mike Rapoport
1 sibling, 0 replies; 23+ messages in thread
From: Mike Rapoport @ 2010-02-07 6:53 UTC (permalink / raw)
To: linux-arm-kernel
Dennis Semakin wrote:
> Hello
>
> I use u-boot.
>
>>
>> The addresses passed to the driver is the I/O area of the chip select
>> signal used for the Ethernet chip. This setting should be alright, as it
>> worked well for me.
>>
>> If your kernel hangs when accessing this area, you most probably haven't
>> set up your static bus correctly. The bootloader is in charge of doing
>> this, and the correct value for CSADRCFG2 is 0x0032C809.
>>
>> Also see http://openpxa.sourceforge.net/ for patches to U-Boot and more
>> information about replacing the native bootloader the modules ships
>> with.
>>
>> Daniel
>>
>
> In U-BOOT:
>
> MSC1 (address 0x4a00000c) - 0x0779
> $ md.w 0x4a00000c
> 4a00000c: 0779 0000 0000 0000 0000 0000 0000 0000 y...............
> 4a00001c: 0008 0000 0000 0000 0000 0000 0000 0000 ................
> 4a00002c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 4a00003c: 0000 0000 0000 0000 0000 0000 0000 0000 ................
>
> CSADRCFG2 (address 0x4a000088) - 0032c809
> $ md.l 0x4a000088
> 4a000088: 0032c809 00020000 00020000 00000000 ..2.............
> 4a000098: 00000000 00000000 00000000 00000000 ................
> 4a0000a8: 00000000 00000000 00000000 00000000 ................
> 4a0000b8: 00000000 00000000 00000000 00000000 ................
> 4a0000c8: 00000000 00000000 00000000 00000000 ................
>
> As I think everythig is right and corresponds to a code
>
> int board_init (void)
> {
> /* arch number for linux kernel */
> gd->bd->bi_arch_number = MACH_TYPE_COLIBRI320;
>
> /* adress of boot parameters */
> gd->bd->bi_boot_params = 0x80000100;
>
> /* configuration for ethernet chip */
> CKENB |= CKENB_7_GPIO;
> GPIO3 = 0x00001c01;
> MSC1 = 0x779;
> CSADRCFG2 = 0x0032C809;
>
> return 0;
> }
>
As far as I remember I had to set CSMSADRCFG to allow access CS1 region
on PXA300. Probably that's the bit that is missing in your setup as
well. The PXA300 developer manual states that "The Chip Select
Configuration Register (CSMSADRCFG) ... must be programmed with 0x02."
It does not explain anything, but without explicit setting of this bit I
had no CS1 activity at all ...
> Thanks
> Best regards
> Dennis Semakin
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2010-02-08 14:13 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04 9:21 [PXA320] How to find I/O registers, base address of ASIX ethernet chip? Dennis Semakin
2010-02-04 12:28 ` Eric Miao
2010-02-04 13:09 ` Dennis Semakin
2010-02-04 13:24 ` Dennis Semakin
2010-02-04 13:31 ` Dennis Semakin
2010-02-05 4:26 ` Daniel Mack
2010-02-05 7:53 ` Uwe Kleine-König
2010-02-07 5:11 ` Daniel Mack
2010-02-08 6:06 ` Eric Miao
2010-02-05 8:02 ` Dennis Semakin
2010-02-07 5:13 ` Daniel Mack
2010-02-08 8:58 ` Dennis Semakin
2010-02-08 8:59 ` Dennis Semakin
2010-02-08 9:13 ` Uwe Kleine-König
2010-02-08 9:31 ` Dennis Semakin
2010-02-08 9:38 ` Dennis Semakin
2010-02-08 10:15 ` Daniel Mack
2010-02-08 12:16 ` Dennis Semakin
2010-02-08 12:49 ` Daniel Mack
2010-02-08 14:13 ` Dennis Semakin
2010-02-08 12:16 ` Dennis Semakin
2010-02-08 9:57 ` Dennis Semakin
2010-02-07 6:53 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox