* [U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb
@ 2011-04-09 18:22 Kumar Gala
2011-04-29 12:51 ` Kumar Gala
2011-04-30 18:47 ` Wolfgang Denk
0 siblings, 2 replies; 3+ messages in thread
From: Kumar Gala @ 2011-04-09 18:22 UTC (permalink / raw)
To: u-boot
From: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Second USB controller only works for SPI and SD boot because of pin muxing
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
---
arch/powerpc/include/asm/immap_85xx.h | 1 +
board/freescale/p1_p2_rdb/p1_p2_rdb.c | 14 ++++++++++++++
include/configs/P1_P2_RDB.h | 1 +
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h
index 5486427..d6ac61a 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -1969,6 +1969,7 @@ typedef struct ccsr_gur {
#define MPC85xx_PMUXCR_SD_DATA 0x80000000
#define MPC85xx_PMUXCR_SDHC_CD 0x40000000
#define MPC85xx_PMUXCR_SDHC_WP 0x20000000
+#define MPC85xx_PMUXCR_ELBC_OFF_USB2_ON 0x01000000
#define MPC85xx_PMUXCR_TDM_ENA 0x00800000
#define MPC85xx_PMUXCR_QE0 0x00008000
#define MPC85xx_PMUXCR_QE1 0x00004000
diff --git a/board/freescale/p1_p2_rdb/p1_p2_rdb.c b/board/freescale/p1_p2_rdb/p1_p2_rdb.c
index 307c3e2..3bd6c38 100644
--- a/board/freescale/p1_p2_rdb/p1_p2_rdb.c
+++ b/board/freescale/p1_p2_rdb/p1_p2_rdb.c
@@ -46,6 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define RGMII_PHY_RST_SET 0x02000000
#define USB_RST_CLR 0x04000000
+#define USB2_PORT_OUT_EN 0x01000000
#define GPIO_DIR 0x060f0000
@@ -127,6 +128,19 @@ int checkboard (void)
return 0;
}
+int misc_init_r(void)
+{
+#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
+ ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
+ ccsr_gpio_t *gpio = (void *)CONFIG_SYS_MPC85xx_GPIO_ADDR;
+
+ setbits_be32(&gpio->gpdir, USB2_PORT_OUT_EN);
+ setbits_be32(&gpio->gpdat, USB2_PORT_OUT_EN);
+ setbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_ELBC_OFF_USB2_ON);
+#endif
+ return 0;
+}
+
int board_early_init_r(void)
{
const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index 5907856..449329a 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -244,6 +244,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_SYS_FLASH_AMD_CHECK_DQ7
#define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */
+#define CONFIG_MISC_INIT_R
#define CONFIG_HWCONFIG
#define CONFIG_SYS_INIT_RAM_LOCK 1
--
1.7.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb
2011-04-09 18:22 [U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb Kumar Gala
@ 2011-04-29 12:51 ` Kumar Gala
2011-04-30 18:47 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2011-04-29 12:51 UTC (permalink / raw)
To: u-boot
On Apr 9, 2011, at 1:22 PM, Kumar Gala wrote:
> From: Ramneek Mehresh <ramneek.mehresh@freescale.com>
>
> Second USB controller only works for SPI and SD boot because of pin muxing
>
> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
> ---
> arch/powerpc/include/asm/immap_85xx.h | 1 +
> board/freescale/p1_p2_rdb/p1_p2_rdb.c | 14 ++++++++++++++
> include/configs/P1_P2_RDB.h | 1 +
> 3 files changed, 16 insertions(+), 0 deletions(-)
applied to 85xx
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb
2011-04-09 18:22 [U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb Kumar Gala
2011-04-29 12:51 ` Kumar Gala
@ 2011-04-30 18:47 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2011-04-30 18:47 UTC (permalink / raw)
To: u-boot
Dear Kumar Gala,
In message <1302373351-19192-1-git-send-email-galak@kernel.crashing.org> you wrote:
> From: Ramneek Mehresh <ramneek.mehresh@freescale.com>
>
> Second USB controller only works for SPI and SD boot because of pin muxing
>
> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
...
> +int misc_init_r(void)
> +{
> +#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
> + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
> + ccsr_gpio_t *gpio = (void *)CONFIG_SYS_MPC85xx_GPIO_ADDR;
> +
> + setbits_be32(&gpio->gpdir, USB2_PORT_OUT_EN);
> + setbits_be32(&gpio->gpdat, USB2_PORT_OUT_EN);
> + setbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_ELBC_OFF_USB2_ON);
> +#endif
> + return 0;
> +}
> +
> int board_early_init_r(void)
> {
> const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
> diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
> index 5907856..449329a 100644
> --- a/include/configs/P1_P2_RDB.h
> +++ b/include/configs/P1_P2_RDB.h
> @@ -244,6 +244,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
> #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7
>
> #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */
> +#define CONFIG_MISC_INIT_R
Would it not make more sense to define CONFIG_MISC_INIT_R only when
it's needed, and not build an empty function else?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What can it profit a man to gain the whole world and to come to his
property with a gastric ulcer, a blown prostate, and bifocals?
-- John Steinbeck, _Cannery Row_
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-30 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-09 18:22 [U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb Kumar Gala
2011-04-29 12:51 ` Kumar Gala
2011-04-30 18:47 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).