* [PATCH 0/2] MIPS: ath79: various fixes
@ 2012-04-27 17:10 Gabor Juhos
2012-04-27 17:10 ` [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12] Gabor Juhos
2012-04-27 17:10 ` [PATCH 2/2] MIPS: ath79: use correct IRQ number for the OHCI controller on AR7240 Gabor Juhos
0 siblings, 2 replies; 5+ messages in thread
From: Gabor Juhos @ 2012-04-27 17:10 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Gabor Juhos
This set contains two fixes for the ath79 platform.
It is based on the mips-for-linux-next branch of the
upstream-sfr tree.
Gabor Juhos (2):
MIPS: ath79: fix number of GPIO lines for AR724[12]
MIPS: ath79: use correct IRQ number for the OHCI controller on AR7240
arch/mips/ath79/dev-usb.c | 2 ++
arch/mips/ath79/gpio.c | 6 ++++--
arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
3 files changed, 8 insertions(+), 3 deletions(-)
--
1.7.2.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12]
2012-04-27 17:10 [PATCH 0/2] MIPS: ath79: various fixes Gabor Juhos
@ 2012-04-27 17:10 ` Gabor Juhos
2012-04-28 12:06 ` Sergei Shtylyov
2012-04-27 17:10 ` [PATCH 2/2] MIPS: ath79: use correct IRQ number for the OHCI controller on AR7240 Gabor Juhos
1 sibling, 1 reply; 5+ messages in thread
From: Gabor Juhos @ 2012-04-27 17:10 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Gabor Juhos
The AR724[12] SoCs have more GPIO lines than the AR7240.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
arch/mips/ath79/gpio.c | 6 ++++--
arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
arch/mips/ath79/gpio.c | 6 ++++--
arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c
index 29054f2..48fe762 100644
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
@@ -188,8 +188,10 @@ void __init ath79_gpio_init(void)
if (soc_is_ar71xx())
ath79_gpio_count = AR71XX_GPIO_COUNT;
- else if (soc_is_ar724x())
- ath79_gpio_count = AR724X_GPIO_COUNT;
+ else if (soc_is_ar7240())
+ ath79_gpio_count = AR7240_GPIO_COUNT;
+ else if (soc_is_ar7241() || soc_is_ar7242())
+ ath79_gpio_count = AR7241_GPIO_COUNT;
else if (soc_is_ar913x())
ath79_gpio_count = AR913X_GPIO_COUNT;
else if (soc_is_ar933x())
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
index 1caa78a..dde5044 100644
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
@@ -393,7 +393,8 @@
#define AR71XX_GPIO_REG_FUNC 0x28
#define AR71XX_GPIO_COUNT 16
-#define AR724X_GPIO_COUNT 18
+#define AR7240_GPIO_COUNT 18
+#define AR7241_GPIO_COUNT 20
#define AR913X_GPIO_COUNT 22
#define AR933X_GPIO_COUNT 30
#define AR934X_GPIO_COUNT 23
--
1.7.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] MIPS: ath79: use correct IRQ number for the OHCI controller on AR7240
2012-04-27 17:10 [PATCH 0/2] MIPS: ath79: various fixes Gabor Juhos
2012-04-27 17:10 ` [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12] Gabor Juhos
@ 2012-04-27 17:10 ` Gabor Juhos
1 sibling, 0 replies; 5+ messages in thread
From: Gabor Juhos @ 2012-04-27 17:10 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Gabor Juhos
The currently assigned IRQ number to the OHCI
controller is incorrect for the AR7240 SoC, and
that leads to the following error message from
the OHCI driver:
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ath79-ohci ath79-ohci: Atheros built-in OHCI controller
ath79-ohci ath79-ohci: new USB bus registered, assigned bus number 1
ath79-ohci ath79-ohci: irq 14, io mem 0x1b000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb 1-1: new full-speed USB device number 2 using ath79-ohci
ath79-ohci ath79-ohci: Unlink after no-IRQ? Controller is probably using the wrong IRQ.
Fix this by using the correct IRQ number.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
arch/mips/ath79/dev-usb.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/mips/ath79/dev-usb.c b/arch/mips/ath79/dev-usb.c
index 36e9570..b2a2311 100644
--- a/arch/mips/ath79/dev-usb.c
+++ b/arch/mips/ath79/dev-usb.c
@@ -145,6 +145,8 @@ static void __init ar7240_usb_setup(void)
ath79_ohci_resources[0].start = AR7240_OHCI_BASE;
ath79_ohci_resources[0].end = AR7240_OHCI_BASE + AR7240_OHCI_SIZE - 1;
+ ath79_ohci_resources[1].start = ATH79_CPU_IRQ_USB;
+ ath79_ohci_resources[1].end = ATH79_CPU_IRQ_USB;
platform_device_register(&ath79_ohci_device);
}
--
1.7.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12]
2012-04-27 17:10 ` [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12] Gabor Juhos
@ 2012-04-28 12:06 ` Sergei Shtylyov
2012-04-28 13:00 ` Gabor Juhos
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2012-04-28 12:06 UTC (permalink / raw)
To: Gabor Juhos; +Cc: Ralf Baechle, linux-mips
Hello.
On 27-04-2012 21:10, Gabor Juhos wrote:
> The AR724[12] SoCs have more GPIO lines than the AR7240.
> Signed-off-by: Gabor Juhos<juhosg@openwrt.org>
Interdiff should be separated by --- tear line.
> arch/mips/ath79/gpio.c | 6 ++++--
> arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
> arch/mips/ath79/gpio.c | 6 ++++--
> arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
... and one was enough. :-)
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12]
2012-04-28 12:06 ` Sergei Shtylyov
@ 2012-04-28 13:00 ` Gabor Juhos
0 siblings, 0 replies; 5+ messages in thread
From: Gabor Juhos @ 2012-04-28 13:00 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Ralf Baechle, linux-mips
Hi Sergei,
> On 27-04-2012 21:10, Gabor Juhos wrote:
>
>> The AR724[12] SoCs have more GPIO lines than the AR7240.
>
>> Signed-off-by: Gabor Juhos<juhosg@openwrt.org>
>
> Interdiff should be separated by --- tear line.
>
>> arch/mips/ath79/gpio.c | 6 ++++--
>> arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
>> 2 files changed, 6 insertions(+), 3 deletions(-)
>
>> arch/mips/ath79/gpio.c | 6 ++++--
>> arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 ++-
>> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> ... and one was enough. :-)
You are absolutely right. It seems that I have messed up one of my patch
handling scripts. I will repost this and the 'MIPS: ath79: allow to use USB on
AR934x' series as well.
Thanks,
Gabor
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-28 13:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 17:10 [PATCH 0/2] MIPS: ath79: various fixes Gabor Juhos
2012-04-27 17:10 ` [PATCH 1/2] MIPS: ath79: fix number of GPIO lines for AR724[12] Gabor Juhos
2012-04-28 12:06 ` Sergei Shtylyov
2012-04-28 13:00 ` Gabor Juhos
2012-04-27 17:10 ` [PATCH 2/2] MIPS: ath79: use correct IRQ number for the OHCI controller on AR7240 Gabor Juhos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox