Alexander Holler | 1 Jan 2000 01:03
Picon
Favicon

[PATCH] USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor.

Remove __attribute__ ((packed)) to prevent byte access to soc
registers in some gcc versions.

Having patches to enable ehci for the BeagleBoard lying around for
several month, this one was the show-stopper.

Credits have to go to Laine Walker-Avina <lwalkera <at> ieee.org> for
finding the problem.

Signed-off-by: Alexander Holler <holler <at> ahsoftware.de>
---
 drivers/usb/host/ehci.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 945ab64..df9f055 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
 <at>  <at>  -55,7 +55,7  <at>  <at>  struct ehci_hccr {
 #define HCS_N_PORTS(p)		(((p) >> 0) & 0xf)
 	uint32_t cr_hccparams;
 	uint8_t cr_hcsp_portrt[8];
-} __attribute__ ((packed));
+};

 struct ehci_hcor {
 	uint32_t or_usbcmd;
 <at>  <at>  -85,7 +85,7  <at>  <at>  struct ehci_hcor {
 #define FLAG_CF		(1 << 0)	/* true:  we'll support "high speed" */
 	uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS];
(Continue reading)

Alexander Holler | 1 Jan 2000 01:06
Picon
Favicon

[PATCH 1/3] OMAP3: Change some USB related MUX settings to values used by the kernel.

Signed-off-by: Alexander Holler <holler <at> ahsoftware.de>
---
 board/ti/beagle/beagle.h |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
index b22b653..abb69e7 100644
--- a/board/ti/beagle/beagle.h
+++ b/board/ti/beagle/beagle.h
 <at>  <at>  -273,18 +273,18  <at>  <at>  const omap3_sysinfo sysinfo = {
 	MUX_VAL(CP(MCSPI1_CS1),		(IDIS | PTD | EN  | M0)) /*McSPI1_CS1*/\
 	MUX_VAL(CP(MCSPI1_CS2),		(IDIS | PTD | DIS | M4)) /*GPIO_176*/\
  /* USB EHCI (port 2) */\
-	MUX_VAL(CP(MCSPI1_CS3),		(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA2*/\
-	MUX_VAL(CP(MCSPI2_CLK),		(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA7*/\
-	MUX_VAL(CP(MCSPI2_SIMO),	(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA4*/\
-	MUX_VAL(CP(MCSPI2_SOMI),	(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA5*/\
-	MUX_VAL(CP(MCSPI2_CS0),		(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA6*/\
-	MUX_VAL(CP(MCSPI2_CS1),		(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA3*/\
-	MUX_VAL(CP(ETK_D10_ES2),	(IDIS | PTU | DIS | M3)) /*HSUSB2_CLK*/\
-	MUX_VAL(CP(ETK_D11_ES2),	(IDIS | PTU | DIS | M3)) /*HSUSB2_STP*/\
-	MUX_VAL(CP(ETK_D12_ES2),	(IEN  | PTU | DIS | M3)) /*HSUSB2_DIR*/\
-	MUX_VAL(CP(ETK_D13_ES2),	(IEN  | PTU | DIS | M3)) /*HSUSB2_NXT*/\
-	MUX_VAL(CP(ETK_D14_ES2),	(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA0*/\
-	MUX_VAL(CP(ETK_D15_ES2),	(IEN  | PTU | DIS | M3)) /*HSUSB2_DATA1*/\
+	MUX_VAL(CP(MCSPI1_CS3),		(IEN  | PTD | EN  | M3)) /*HSUSB2_DATA2*/\
+	MUX_VAL(CP(MCSPI2_CLK),		(IEN  | PTD | EN  | M3)) /*HSUSB2_DATA7*/\
+	MUX_VAL(CP(MCSPI2_SIMO),	(IEN  | PTD | EN  | M3)) /*HSUSB2_DATA4*/\
+	MUX_VAL(CP(MCSPI2_SOMI),	(IEN  | PTD | EN  | M3)) /*HSUSB2_DATA5*/\
+	MUX_VAL(CP(MCSPI2_CS0),		(IEN  | PTD | EN  | M3)) /*HSUSB2_DATA6*/\
(Continue reading)

Alexander Holler | 1 Jan 2000 01:06
Picon
Favicon

[PATCH 2/3] OMAP3: Add support for DPLL5 (usbhost)

Signed-off-by: Alexander Holler <holler <at> ahsoftware.de>
---
 arch/arm/cpu/armv7/omap3/clock.c               |   20 ++++++++++++++++++
 arch/arm/cpu/armv7/omap3/lowlevel_init.S       |   22 ++++++++++++++++++++
 arch/arm/include/asm/arch-omap3/clocks.h       |    1 +
 arch/arm/include/asm/arch-omap3/clocks_omap3.h |   26 ++++++++++++++++++++++++
 arch/arm/include/asm/arch-omap3/cpu.h          |   21 ++++++++++++++----
 5 files changed, 85 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c
index 2238c52..3d38d08 100644
--- a/arch/arm/cpu/armv7/omap3/clock.c
+++ b/arch/arm/cpu/armv7/omap3/clock.c
 <at>  <at>  -278,6 +278,25  <at>  <at>  static void dpll4_init_34xx(u32 sil_index, u32 clk_index)
 	wait_on_value(ST_PERIPH_CLK, 2, &prcm_base->idlest_ckgen, LDELAY);
 }

+static void dpll5_init_34xx(u32 sil_index, u32 clk_index)
+{
+	struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
+	dpll_param *ptr = (dpll_param *) get_per2_dpll_param();
+
+	/* Moving it to the right sysclk base */
+	ptr = ptr + clk_index;
+
+	/* PER2 DPLL (DPLL5) */
+	sr32(&prcm_base->clken2_pll, 0, 3, PLL_STOP);
+	wait_on_value(1, 0, &prcm_base->idlest2_ckgen, LDELAY);
+	sr32(&prcm_base->clksel5_pll, 0, 5, ptr->m2); /* set M2 (usbtll_fck) */
+	sr32(&prcm_base->clksel4_pll, 8, 11, ptr->m); /* set m (11-bit multiplier) */
(Continue reading)

Alexander Holler | 1 Jan 2000 01:06
Picon
Favicon

[PATCH 3/3] omap3_beagle: enable EHCI and USB storage.

The reset sequence/configuration for ehci is highly board specific,
so this will be done in the source for the board, instead of
introducing several CONFIG_* which would be needed to make those
few lines in beagle.c usable across different OMAP boards.

Signed-off-by: Alexander Holler <holler <at> ahsoftware.de>
---
 arch/arm/include/asm/arch-omap3/ehci_omap3.h |   58 ++++++++++++++
 board/ti/beagle/beagle.c                     |  106 ++++++++++++++++++++++++++
 include/configs/omap3_beagle.h               |    6 ++
 3 files changed, 170 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/ehci_omap3.h

diff --git a/arch/arm/include/asm/arch-omap3/ehci_omap3.h b/arch/arm/include/asm/arch-omap3/ehci_omap3.h
new file mode 100644
index 0000000..cd01f50
--- /dev/null
+++ b/arch/arm/include/asm/arch-omap3/ehci_omap3.h
 <at>  <at>  -0,0 +1,58  <at>  <at> 
+/*
+ * (C) Copyright 2011
+ * Alexander Holler <holler <at> ahsoftware.de>
+ *
+ * Based on "drivers/usb/host/ehci-omap.c" from Linux 2.6.37
+ *
+ * See there for additional Copyrights.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
(Continue reading)


Gmane