pwsh1: get rid of unused lines
This commit is contained in:
parent
107a5a5b9b
commit
61671339a9
|
@ -54,7 +54,7 @@ int board_early_init_f(void)
|
|||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = 0x8000000; // 128MiB
|
||||
gd->ram_size = PHYS_SDRAM_1_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -67,20 +67,20 @@ int board_init(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_CMD_MMC
|
||||
static int mx28evk_mmc_wp(int id)
|
||||
static int brain_mmc_wp(int id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mx28evk_mmc_cd(int id)
|
||||
static int brain_mmc_cd(int id)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int board_mmc_init(bd_t *bis)
|
||||
{
|
||||
mxsmmc_initialize(bis, 0, mx28evk_mmc_wp, mx28evk_mmc_cd);
|
||||
mxsmmc_initialize(bis, 1, mx28evk_mmc_wp, mx28evk_mmc_cd);
|
||||
mxsmmc_initialize(bis, 0, brain_mmc_wp, brain_mmc_cd);
|
||||
mxsmmc_initialize(bis, 1, brain_mmc_wp, brain_mmc_cd);
|
||||
|
||||
/* Turn on the SD*/
|
||||
gpio_direction_output(MX28_PAD_SSP2_SS2__GPIO_2_21, 0);
|
||||
|
@ -88,60 +88,6 @@ int board_mmc_init(bd_t *bis)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_NET
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
struct mxs_clkctrl_regs *clkctrl_regs =
|
||||
(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
|
||||
struct eth_device *dev;
|
||||
int ret;
|
||||
|
||||
ret = cpu_eth_init(bis);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* MX28EVK uses ENET_CLK PAD to drive FEC clock */
|
||||
writel(CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN,
|
||||
&clkctrl_regs->hw_clkctrl_enet);
|
||||
|
||||
/* Power-on FECs */
|
||||
gpio_direction_output(MX28_PAD_SSP1_DATA3__GPIO_2_15, 0);
|
||||
|
||||
/* Reset FEC PHYs */
|
||||
gpio_direction_output(MX28_PAD_ENET0_RX_CLK__GPIO_4_13, 0);
|
||||
udelay(200);
|
||||
gpio_set_value(MX28_PAD_ENET0_RX_CLK__GPIO_4_13, 1);
|
||||
|
||||
ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE);
|
||||
if (ret) {
|
||||
puts("FEC MXS: Unable to init FEC0\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = fecmxc_initialize_multi(bis, 1, 3, MXS_ENET1_BASE);
|
||||
if (ret) {
|
||||
puts("FEC MXS: Unable to init FEC1\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
dev = eth_get_dev_by_name("FEC0");
|
||||
if (!dev) {
|
||||
puts("FEC MXS: Unable to get FEC0 device entry\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev = eth_get_dev_by_name("FEC1");
|
||||
if (!dev) {
|
||||
puts("FEC MXS: Unable to get FEC1 device entry\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_MXS
|
||||
static int mxsfb_write_byte(uint32_t payload, const unsigned int data)
|
||||
{
|
||||
|
|
|
@ -10,20 +10,21 @@ CONFIG_SPL=y
|
|||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
CONFIG_VERSION_VARIABLE=y
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
# CONFIG_SPL_FRAMEWORK is not set
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_DATE=y
|
||||
CONFIG_CMD_EXT4=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
# CONFIG_NET is not set
|
||||
CONFIG_MMC_MXS=y
|
||||
CONFIG_CONS_INDEX=0
|
||||
CONFIG_SPI=y
|
||||
CONFIG_MXS_SPI=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
|
|
|
@ -22,11 +22,7 @@
|
|||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
|
||||
/* Environment */
|
||||
#ifndef CONFIG_ENV_IS_IN_SPI_FLASH
|
||||
#define CONFIG_ENV_SIZE (16 * 1024)
|
||||
#else
|
||||
#define CONFIG_ENV_SIZE (4 * 1024)
|
||||
#endif
|
||||
#define CONFIG_ENV_OVERWRITE
|
||||
|
||||
/* Environment is in MMC */
|
||||
|
@ -35,64 +31,12 @@
|
|||
#define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
#endif
|
||||
|
||||
/* Environment is in NAND */
|
||||
#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
|
||||
#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
|
||||
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
|
||||
#define CONFIG_ENV_RANGE (512 * 1024)
|
||||
#define CONFIG_ENV_OFFSET 0x300000
|
||||
#define CONFIG_ENV_OFFSET_REDUND \
|
||||
(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
|
||||
#endif
|
||||
|
||||
/* Environment is in SPI flash */
|
||||
#if defined(CONFIG_CMD_SF) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
|
||||
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
|
||||
#define CONFIG_ENV_OFFSET 0x40000 /* 256K */
|
||||
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
|
||||
#define CONFIG_ENV_SECT_SIZE 0x1000
|
||||
#define CONFIG_ENV_SPI_CS 0
|
||||
#define CONFIG_ENV_SPI_BUS 2
|
||||
#define CONFIG_ENV_SPI_MAX_HZ 24000000
|
||||
#define CONFIG_ENV_SPI_MODE SPI_MODE_0
|
||||
#endif
|
||||
|
||||
/* UBI and NAND partitioning */
|
||||
|
||||
/* FEC Ethernet on SoC */
|
||||
#ifdef CONFIG_CMD_NET
|
||||
#define CONFIG_FEC_MXC
|
||||
#define CONFIG_FEC_MXC_MDIO_BASE MXS_ENET0_BASE
|
||||
#define CONFIG_MX28_FEC_MAC_IN_OCOTP
|
||||
#endif
|
||||
|
||||
/* RTC */
|
||||
#ifdef CONFIG_CMD_DATE
|
||||
#define CONFIG_RTC_MXS
|
||||
#endif
|
||||
|
||||
/* USB */
|
||||
#ifdef CONFIG_CMD_USB
|
||||
#define CONFIG_EHCI_MXS_PORT1
|
||||
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
|
||||
#endif
|
||||
|
||||
/* SPI */
|
||||
#ifdef CONFIG_CMD_SPI
|
||||
#define CONFIG_DEFAULT_SPI_BUS 2
|
||||
#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0
|
||||
|
||||
/* SPI Flash */
|
||||
#ifdef CONFIG_CMD_SF
|
||||
#define CONFIG_SF_DEFAULT_BUS 2
|
||||
#define CONFIG_SF_DEFAULT_CS 0
|
||||
/* this may vary and depends on the installed chip */
|
||||
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
|
||||
#define CONFIG_SF_DEFAULT_SPEED 24000000
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Framebuffer support */
|
||||
#ifdef CONFIG_VIDEO
|
||||
#define CONFIG_VIDEO_MXS_MODE_SYSTEM
|
||||
|
|
Loading…
Reference in New Issue