[U-Boot] [PATCH] powerpc/85xx: Add support for 2nd USB controller on p1_p2_rdb

Wolfgang Denk wd at denx.de
Sat Apr 30 20:47:44 CEST 2011


Dear Kumar Gala,

In message <1302373351-19192-1-git-send-email-galak at kernel.crashing.org> you wrote:
> From: Ramneek Mehresh <ramneek.mehresh at freescale.com>
> 
> Second USB controller only works for SPI and SD boot because of pin muxing
> 
> Signed-off-by: Ramneek Mehresh <ramneek.mehresh at 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_


More information about the U-Boot mailing list