Skip to content

Commit

Permalink
Merge branch 'master' of git://git.denx.de/u-boot-samsung
Browse files Browse the repository at this point in the history
  • Loading branch information
trini committed Aug 8, 2018
2 parents b1aad8d + 972d857 commit fc82e76
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 62 deletions.
4 changes: 0 additions & 4 deletions arch/arm/dts/exynos4210-pinctrl-uboot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/{
pinctrl_0: pinctrl@11400000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "samsung,exynos4210-pinctrl";
};

Expand All @@ -21,8 +19,6 @@
};

pinctrl_2: pinctrl@03860000 {
#address-cells = <1>;
#size-cells = <1>;
};

};
2 changes: 0 additions & 2 deletions arch/arm/dts/exynos4210-universal_c210.dts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
gpio-mosi = <&gpy3 3 0>;
gpio-miso = <&gpy3 0 0>;
spi-delay-us = <1>;
#address-cells = <1>;
#size-cells = <0>;
cs@0 {
};
};
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/dts/exynos4x12-pinctrl-uboot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@
};

pinctrl_2: pinctrl@03860000 {
#address-cells = <1>;
#size-cells = <1>;
};

pinctrl_3: pinctrl@106E0000 {
#address-cells = <1>;
#size-cells = <1>;
};

};
2 changes: 0 additions & 2 deletions arch/arm/dts/exynos5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@
dp: dp@145b0000 {
compatible = "samsung,exynos5-dp";
reg = <0x145b0000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
};

xhci0: xhci@12000000 {
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/dts/exynos5250-pinctrl-uboot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
};

pinctrl_1: pinctrl@13400000 {
#address-cells = <1>;
#size-cells = <1>;
};

pinctrl_2: pinctrl@10d10000 {
Expand All @@ -34,8 +32,6 @@
};

pinctrl_3: pinctrl@03860000 {
#address-cells = <1>;
#size-cells = <1>;
};

};
2 changes: 1 addition & 1 deletion arch/arm/dts/exynos5250-spring.dts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
spi2 = "/spi@12d40000";
spi3 = "/spi@131a0000";
spi4 = "/spi@131b0000";
mmc0 = "/mmc@12000000";
mmc0 = "/mmc@12200000";
serial0 = "/serial@12C30000";
console = "/serial@12C30000";
i2s = "/sound@3830000";
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/dts/exynos54xx-pinctrl-uboot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* numbers are not needed in U-Boot for exynos.
*/
pinctrl@14010000 {
#address-cells = <1>;
#size-cells = <1>;
};
pinctrl@13400000 {
#address-cells = <1>;
Expand All @@ -26,16 +24,10 @@
};
};
pinctrl@13410000 {
#address-cells = <1>;
#size-cells = <1>;
};
pinctrl@14000000 {
#address-cells = <1>;
#size-cells = <1>;
};
pinctrl@03860000 {
#address-cells = <1>;
#size-cells = <1>;
};

};
6 changes: 3 additions & 3 deletions board/samsung/common/bootscripts/autoboot.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ setenv boot_img "

#### Routine: autoboot - choose proper boot path
setenv autoboot "
if test -e mmc 0:${mmcbootpart} Image.itb; then
if test -e mmc ${mmcbootdev}:${mmcbootpart} Image.itb; then
echo Found kernel image: Image.itb;
run setboot_fit;
run boot_img;
elif test -e mmc 0:${mmcbootpart} zImage; then
elif test -e mmc ${mmcbootdev}:${mmcbootpart} zImage; then
echo Found kernel image: zImage;
run setboot_zimg;
run boot_img;
elif test -e mmc 0:${mmcbootpart} uImage; then
elif test -e mmc ${mmcbootdev}:${mmcbootpart} uImage; then
echo Found kernel image: uImage;
run setboot_uimg;
run boot_img;
Expand Down
1 change: 1 addition & 0 deletions board/samsung/smdk5420/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ F: configs/peach-pi_defconfig

ODROID-XU3 BOARD
M: Jaehoon Chung <[email protected]>
M: Lukasz Majewski <[email protected]>
S: Maintained
F: board/samsung/smdk5420/
F: include/configs/odroid_xu3.h
Expand Down
3 changes: 1 addition & 2 deletions configs/odroid-xu3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_ADC=y
CONFIG_ADC_EXYNOS=y
CONFIG_DFU_MMC=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
CONFIG_NETDEVICES=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x5000000
Expand Down
37 changes: 21 additions & 16 deletions drivers/mmc/exynos_dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ struct dwmci_exynos_priv_data {
*/
static void exynos_dwmci_clksel(struct dwmci_host *host)
{
#ifdef CONFIG_DM_MMC
struct dwmci_exynos_priv_data *priv =
container_of(host, struct dwmci_exynos_priv_data, host);
#else
struct dwmci_exynos_priv_data *priv = host->priv;

#endif
dwmci_writel(host, DWMCI_CLKSEL, priv->sdr_timing);
}

Expand Down Expand Up @@ -146,17 +150,11 @@ static int do_dwmci_init(struct dwmci_host *host)
}

static int exynos_dwmci_get_config(const void *blob, int node,
struct dwmci_host *host)
struct dwmci_host *host,
struct dwmci_exynos_priv_data *priv)
{
int err = 0;
u32 base, timing[3];
struct dwmci_exynos_priv_data *priv;

priv = malloc(sizeof(struct dwmci_exynos_priv_data));
if (!priv) {
pr_err("dwmci_exynos_priv_data malloc fail!\n");
return -ENOMEM;
}

/* Extract device id for each mmc channel */
host->dev_id = pinmux_decode_periph_id(blob, node);
Expand All @@ -167,7 +165,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,

if (host->dev_index > 4) {
printf("DWMMC%d: Can't get the dev index\n", host->dev_index);
free(priv);
return -EINVAL;
}

Expand All @@ -178,7 +175,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
base = fdtdec_get_addr(blob, node, "reg");
if (!base) {
printf("DWMMC%d: Can't get base address\n", host->dev_index);
free(priv);
return -EINVAL;
}
host->ioaddr = (void *)base;
Expand All @@ -188,7 +184,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
if (err) {
printf("DWMMC%d: Can't get sdr-timings for devider\n",
host->dev_index);
free(priv);
return -EINVAL;
}

Expand All @@ -208,14 +203,13 @@ static int exynos_dwmci_get_config(const void *blob, int node,
host->bus_hz = fdtdec_get_int(blob, node, "bus_hz", 0);
host->div = fdtdec_get_int(blob, node, "div", 0);

host->priv = priv;

return 0;
}

static int exynos_dwmci_process_node(const void *blob,
int node_list[], int count)
{
struct dwmci_exynos_priv_data *priv;
struct dwmci_host *host;
int i, node, err;

Expand All @@ -224,11 +218,20 @@ static int exynos_dwmci_process_node(const void *blob,
if (node <= 0)
continue;
host = &dwmci_host[i];
err = exynos_dwmci_get_config(blob, node, host);

priv = malloc(sizeof(struct dwmci_exynos_priv_data));
if (!priv) {
pr_err("dwmci_exynos_priv_data malloc fail!\n");
return -ENOMEM;
}

err = exynos_dwmci_get_config(blob, node, host, priv);
if (err) {
printf("%s: failed to decode dev %d\n", __func__, i);
free(priv);
return err;
}
host->priv = priv;

do_dwmci_init(host);
}
Expand Down Expand Up @@ -266,7 +269,8 @@ static int exynos_dwmmc_probe(struct udevice *dev)
struct dwmci_host *host = &priv->host;
int err;

err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host);
err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host,
priv);
if (err)
return err;
err = do_dwmci_init(host);
Expand All @@ -291,6 +295,7 @@ static int exynos_dwmmc_bind(struct udevice *dev)

static const struct udevice_id exynos_dwmmc_ids[] = {
{ .compatible = "samsung,exynos4412-dw-mshc" },
{ .compatible = "samsung,exynos-dwmmc" },
{ }
};

Expand Down
1 change: 1 addition & 0 deletions include/configs/exynos5-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
func(MMC, mmc, 2) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)

Expand Down
36 changes: 20 additions & 16 deletions include/configs/odroid.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

/* Console configuration */

#define CONFIG_BOOTCOMMAND "run autoboot"
#define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run autoboot"
#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8"

#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \
Expand All @@ -50,7 +50,7 @@
#define CONFIG_SYS_MONITOR_BASE 0x00000000

#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
#define CONFIG_ENV_SIZE 4096
#define CONFIG_ENV_SIZE SZ_16K
#define CONFIG_ENV_OFFSET (SZ_1K * 1280) /* 1.25 MiB offset */
#define CONFIG_ENV_OVERWRITE

Expand Down Expand Up @@ -83,6 +83,12 @@
"bl2 raw 0x1f 0x1d;" \
"tzsw raw 0x83f 0x138\0"

#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0)

#include <config_distro_bootcmd.h>

/*
* Bootable media layout:
* dev: SD eMMC(part boot)
Expand All @@ -100,21 +106,21 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadbootscript=load mmc ${mmcbootdev}:${mmcbootpart} ${scriptaddr} " \
"boot.scr\0" \
"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} " \
"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} " \
"${kernelname}\0" \
"loadinitrd=load mmc ${mmcbootdev}:${mmcbootpart} ${initrdaddr} " \
"loadinitrd=load mmc ${mmcbootdev}:${mmcbootpart} ${ramdisk_addr_r} " \
"${initrdname}\0" \
"loaddtb=load mmc ${mmcbootdev}:${mmcbootpart} ${fdtaddr} " \
"loaddtb=load mmc ${mmcbootdev}:${mmcbootpart} ${fdt_addr_r} " \
"${fdtfile}\0" \
"check_ramdisk=" \
"if run loadinitrd; then " \
"setenv initrd_addr ${initrdaddr};" \
"setenv initrd_addr ${ramdisk_addr_r};" \
"else " \
"setenv initrd_addr -;" \
"fi;\0" \
"check_dtb=" \
"if run loaddtb; then " \
"setenv fdt_addr ${fdtaddr};" \
"setenv fdt_addr ${fdt_addr_r};" \
"else " \
"setenv fdt_addr;" \
"fi;\0" \
Expand All @@ -125,27 +131,24 @@
"run loadbootscript;" \
"source ${scriptaddr}\0" \
"boot_fit=" \
"setenv kerneladdr 0x42000000;" \
"setenv kernelname Image.itb;" \
"run loadkernel;" \
"run kernel_args;" \
"bootm ${kerneladdr}#${boardname}\0" \
"bootm ${kernel_addr_r}#${boardname}\0" \
"boot_uimg=" \
"setenv kerneladdr 0x40007FC0;" \
"setenv kernelname uImage;" \
"run check_dtb;" \
"run check_ramdisk;" \
"run loadkernel;" \
"run kernel_args;" \
"bootm ${kerneladdr} ${initrd_addr} ${fdt_addr};\0" \
"bootm ${kernel_addr_r} ${initrd_addr} ${fdt_addr};\0" \
"boot_zimg=" \
"setenv kerneladdr 0x40007FC0;" \
"setenv kernelname zImage;" \
"run check_dtb;" \
"run check_ramdisk;" \
"run loadkernel;" \
"run kernel_args;" \
"bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0" \
"bootz ${kernel_addr_r} ${initrd_addr} ${fdt_addr};\0" \
"autoboot=" \
"if test -e mmc 0 boot.scr; then; " \
"run boot_script; " \
Expand All @@ -161,15 +164,16 @@
"mmcbootpart=1\0" \
"mmcrootdev=0\0" \
"mmcrootpart=2\0" \
"bootdelay=0\0" \
"dfu_alt_system="CONFIG_DFU_ALT \
"dfu_alt_info=Please reset the board\0" \
"consoleon=set console console=ttySAC1,115200n8; save; reset\0" \
"consoleoff=set console console=ram; save; reset\0" \
"initrdname=uInitrd\0" \
"initrdaddr=42000000\0" \
"ramdisk_addr_r=0x42000000\0" \
"scriptaddr=0x42000000\0" \
"fdtaddr=40800000\0"
"fdt_addr_r=0x40800000\0" \
"kernel_addr_r=0x41000000\0" \
BOOTENV

/* GPT */

Expand Down
3 changes: 3 additions & 0 deletions include/configs/snow.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#ifndef __CONFIG_SNOW_H
#define __CONFIG_SNOW_H

#define EXYNOS_FDTFILE_SETTING \
"fdtfile=exynos5250-snow.dtb\0"

#include <configs/exynos5250-common.h>
#include <configs/exynos5-dt-common.h>
#include <configs/exynos5-common.h>
Expand Down

0 comments on commit fc82e76

Please sign in to comment.