Skip to contentSkip to conversation

usb: ehci: rmobile: Add support R8A7793

PATCH New Nobuhiro Iwamatsu 2 participants 5 messages Nov 4, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 usb: ehci: rmobile: Add support R8A7793

R8A7793 has same IP of USB controller as R8A7791 and R8A7794 of rmobile ARM SoCs. This adds support R8A7793 to EHCI HCD of rmobile.

---
 drivers/usb/host/ehci-rmobile.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/usb/host/ehci-rmobile.c +5 -0
index 0d1a726..a89f04b 100644
@@ -27,6 +27,11 @@ static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
 	0xEE080000,	/* USB0 (EHCI) */
 	0xEE0C0000,	/* USB1 */
 };
+#elif defined(CONFIG_R8A7793)
+static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
+	0xEE080000,	/* USB0 (EHCI) */
+	0xEE0C0000,	/* USB1 */
+};
 #elif defined(CONFIG_R8A7794)
 static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
 	0xEE080000,	/* USB0 (EHCI) */
Signature · 1 line
2.1.1
#1 lore raw

PATCH 2/2 usb: ehci: rmobile: Collect up address data

R8A7791, R8A7793 and R8A7794 have same IP of USB controller. This collect up address data of each SoCs.

---
 drivers/usb/host/ehci-rmobile.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
drivers/usb/host/ehci-rmobile.c +2 -11
index a89f04b..b433087 100644
@@ -22,17 +22,8 @@ static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
 	0xEE0A0000,	/* USB1 */
 	0xEE0C0000,	/* USB2 */
 };
-#elif defined(CONFIG_R8A7791)
-static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
-	0xEE080000,	/* USB0 (EHCI) */
-	0xEE0C0000,	/* USB1 */
-};
-#elif defined(CONFIG_R8A7793)
-static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
-	0xEE080000,	/* USB0 (EHCI) */
-	0xEE0C0000,	/* USB1 */
-};
-#elif defined(CONFIG_R8A7794)
+#elif defined(CONFIG_R8A7791) || defined(CONFIG_R8A7793) || \
+	defined(CONFIG_R8A7794)
 static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
 	0xEE080000,	/* USB0 (EHCI) */
 	0xEE0C0000,	/* USB1 */
Signature · 1 line
2.1.1
#2 lore raw

PATCH 1/2 usb: ehci: rmobile: Add support R8A7793

In reply to Nobuhiro Iwamatsu

On Tuesday, November 04, 2014 at 01:56:41 AM, Nobuhiro Iwamatsu wrote:

Hi!

Quoted 15 lines

R8A7793 has same IP of USB controller as R8A7791 and R8A7794 of rmobile ARM SoCs. This adds support R8A7793 to EHCI HCD of rmobile.

---
 drivers/usb/host/ehci-rmobile.c | 5 +++++
 1 file changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/usb/host/ehci-rmobile.c index 0d1a726..a89f04b 100644

drivers/usb/host/ehci-rmobile.c +0 -0
@@ -27,6 +27,11 @@ static u32

usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { 0xEE080000, /* USB0
(EHCI) */

drivers/usb/host/ehci-rmobile.c static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { · line 34

Quoted 7 lines
drivers/usb/host/ehci-rmobile.c +5 -0
 	0xEE0C0000,	/* USB1 */
 };
+#elif defined(CONFIG_R8A7793)
+static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
+	0xEE080000,	/* USB0 (EHCI) */
+	0xEE0C0000,	/* USB1 */
+};

I see you combined those three arrays in the next patch, thanks!

Quoted 3 lines

#elif defined(CONFIG_R8A7794)
static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
0xEE080000, /* USB0 (EHCI) */

btw. just an idea, but you don't need to explicitly use usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT], you can just use usb_base_address[] in the array definition. Then, in the code, you can just use "ARRAY_SIZE(usb_base_address) - 1" instead of CONFIG_USB_MAX_CONTROLLER_COUNT . This rids you of one annoying macro in that driver ;-) If you want to implement this, then please do so, but in a separate patch.

I'll pick these two patches now.

Thanks!

Best regards,
Marek Vasut

#3 lore raw

PATCH 1/2 usb: ehci: rmobile: Add support R8A7793

Hi!

2014-11-04 14:02 GMT+09:00 Marek Vasut <[email protected]>:

Quoted 33 lines · Nobuhiro Iwamatsu

Hi!

Quoted 17 lines

R8A7793 has same IP of USB controller as R8A7791 and R8A7794 of rmobile ARM SoCs. This adds support R8A7793 to EHCI HCD of rmobile.

---
 drivers/usb/host/ehci-rmobile.c | 5 +++++
 1 file changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/usb/host/ehci-rmobile.c index 0d1a726..a89f04b 100644

drivers/usb/host/ehci-rmobile.c +0 -0
@@ -27,6 +27,11 @@ static u32

usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { 0xEE080000, /* USB0
(EHCI) */

      0xEE0C0000,     /* USB1 */

};

drivers/usb/host/ehci-rmobile.c static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { · line 34

Quoted 5 lines
drivers/usb/host/ehci-rmobile.c +5 -0
+#elif defined(CONFIG_R8A7793)
+static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
+     0xEE080000,     /* USB0 (EHCI) */
+     0xEE0C0000,     /* USB1 */
+};

I see you combined those three arrays in the next patch, thanks!

Quoted 3 lines

#elif defined(CONFIG_R8A7794)

 static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = {
      0xEE080000,     /* USB0 (EHCI) */
Quoted 7 lines

btw. just an idea, but you don't need to explicitly use usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT], you can just use usb_base_address[] in the array definition. Then, in the code, you can just use "ARRAY_SIZE(usb_base_address) - 1" instead of CONFIG_USB_MAX_CONTROLLER_COUNT . This rids you of one annoying macro in that driver ;-) If you want to implement this, then please do so, but in a separate patch.

Indeed. I will create a patch which fix your point.

Quoted 2 lines

I'll pick these two patches now.

Thanks!

Quoted 5 lines

Thanks!

Best regards,
Marek Vasut

Best regards,
Nobuhiro

Signature · 1 line
Nobuhiro Iwamatsu
#4 lore raw

PATCH 1/2 usb: ehci: rmobile: Add support R8A7793

Quoted 1 line · Nobuhiro Iwamatsu

Hi!

Hi!

[...]

Quoted 8 lines
Quoted 7 lines

btw. just an idea, but you don't need to explicitly use usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT], you can just use usb_base_address[] in the array definition. Then, in the code, you can just use "ARRAY_SIZE(usb_base_address) - 1" instead of CONFIG_USB_MAX_CONTROLLER_COUNT . This rids you of one annoying macro in that driver ;-) If you want to implement this, then please do so, but in a separate patch.

Quoted 5 lines

Indeed. I will create a patch which fix your point.

Quoted 1 line

I'll pick these two patches now.

Thanks!

Thank you, I will queue it for the next PR, since I sent this one out already.

Best regards,
Marek Vasut