Subject: Unable to write registers to enable USB clock on SA-1111 board

From: "Arjan Opmeer (EMN)" <[email-masked]>
Date: Wed, 2 Aug 2000 15:42:23 +0200

Hi,

As no-one seemed to be working on enabling the USB host port on the
SA-1111 board, I tried my hand at a quick hack myself... ;-)

I modified the usb-ohci driver enough to have it recognise the host
controller, but it doesn't detect any USB port. I thought this might
be because the USB controller isn't fully reset after powerup (see
section 6.1.1). So I added some code to start the USB clock and clear
the two bits in the USB reset register. But it doesn't seem to work!

The code looks like this (bits from SA-1111.h included):

#define SKPCR_UCLKEN   (1<<0)

#define _USB_RST   _SA1111(0x051c)
#define USB_RST   (*((volatile Word *) SA1111_p2v(_USB_RST)))
#define USB_RST_FORCEIFRESET   (1<<0)
#define USB_RST_FORCEHCRESET   (1<<1)

/* Enable USB clock */
SKPCR |= SKPCR_UCLKEN;
printk("SKPCR: %x\n", SKPCR);

/* Wait at least 10 us */
udelay(15);

/* Clear ForceIfReset bit */
USB_RST &= ~(USB_RST_FORCEIFRESET);
printk("USB_RST: %x\n", USB_RST);

/* Clear ForceHcReset bit */
USB_RST &= ~(USB_RST_FORCEHCRESET);
printk("USB_RST: %X\n", USB_RST);

But this code doesn't seem to work. The three printks al print a
value of 0 (zero) and that's not what I expected.

So, does anybody know why this doesn't work? I would like to leave
this USB problem behind me and tackle the next one; enabling the
onboard Ethernet controller.... :-)

Oh, by the way, when I have the code working and cleaned up, how
do I submit it for inclusion into the ARM Linux code base?
Extract a diff file and mail it to Russell or Nicholas or some
other hacker?

Thanks to anyone who can answer my questions,

Arjan

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: John G Dorsey <[email-masked]>
Date: Wed, 2 Aug 2000 11:11:18 -0400

-----Original Message-----
From: Arjan Opmeer (EMN) <[email-masked]>
To: [email-masked]' <[email-masked]>
Date: Wednesday, August 02, 2000 9:49 AM
Subject: Unable to write registers to enable USB clock on SA-1111 board

>printk("SKPCR: %x\n", SKPCR);

This is displaying 0? Are you sure your kernel has lit up the RAB on the
SA-1111? (See sa1111_init() in arch/arm/kernel/hw-sa1100.c)

>Extract a diff file and mail it to Russell or Nicholas or some

Nicolas gets StrongARM stuff. I think he's on vacation for a little while at
the moment. If your patch is of general usefulness, you might put it up on a
server and announce its availability on one of the mailing lists.

-jd