* [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM
@ 2017-04-22 6:50 Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata Lokesh Vutla
` (5 more replies)
0 siblings, 6 replies; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
Enable SPL_DM on all AM335x based TI platforms.
am335x_evm_defconfig:
Before this seires:
text data bss dec hex filename
76508 4185 204672 285365 45ab5 spl/u-boot-spl
spl/u-boot-spl.bin: 80700
After this seires:
text data bss dec hex filename
75589 3369 204608 283566 453ae spl/u-boot-spl
spl/u-boot-spl.bin: 78964
am335x_hs_evm_defconfig:
Before this series:
text data bss dec hex filename
34317 2412 198856 235585 39841 spl/u-boot-spl
spl/u-boot-spl.bin: 36732
After this series:
text data bss dec hex filename
37590 2636 198856 239082 3a5ea spl/u-boot-spl
spl/u-boot-spl.bin: 40228
Using board-data way instead of using DT as suggested by
Tom here[1]. This is mainly due to space constraints.
[1] https://www.mail-archive.com/u-boot at lists.denx.de/msg238483.html
Lokesh Vutla (6):
dm: mmc: omap_hsmmc: Update to support of-platdata
dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver
configs: am335x_evm: Use omap2 generic spl load script
am33xx: Provide platform data for mmc
configs: am335x_evm: Enable SPL_DM
arm: am335x: Enable tiny printf in SPL
arch/arm/Kconfig | 1 +
arch/arm/include/asm/omap_mmc.h | 9 +++++++++
arch/arm/mach-omap2/am33xx/Kconfig | 5 +++++
board/ti/am335x/board.c | 32 ++++++++++++++++++++++++++++++++
drivers/mmc/omap_hsmmc.c | 25 +++++++++++++++----------
include/configs/am335x_evm.h | 3 +--
include/configs/ti_am335x_common.h | 2 ++
7 files changed, 65 insertions(+), 12 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
@ 2017-04-22 6:50 ` Lokesh Vutla
2017-04-25 21:09 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 2/6] dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver Lokesh Vutla
` (4 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
This is to aid platforms that uses OF_PLATDATA.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/include/asm/omap_mmc.h | 9 +++++++++
drivers/mmc/omap_hsmmc.c | 24 ++++++++++++++----------
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h
index f2bf645b33..ba019b0788 100644
--- a/arch/arm/include/asm/omap_mmc.h
+++ b/arch/arm/include/asm/omap_mmc.h
@@ -25,6 +25,8 @@
#ifndef OMAP_MMC_H_
#define OMAP_MMC_H_
+#include <mmc.h>
+
struct hsmmc {
#ifdef CONFIG_DM_MMC
unsigned char res0[0x100];
@@ -52,6 +54,13 @@ struct hsmmc {
unsigned int capa; /* 0x140 */
};
+struct omap_hsmmc_plat {
+ struct mmc_config cfg;
+ struct hsmmc *base_addr;
+ struct mmc mmc;
+ bool cd_inverted;
+};
+
/*
* OMAP HS MMC Bit definitions
*/
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 83dda09c1f..f2489473b0 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -56,11 +56,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define SYSCTL_SRC (1 << 25)
#define SYSCTL_SRD (1 << 26)
-struct omap_hsmmc_plat {
- struct mmc_config cfg;
- struct mmc mmc;
-};
-
struct omap_hsmmc_data {
struct hsmmc *base_addr;
#ifndef CONFIG_DM_MMC
@@ -773,16 +768,16 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
return 0;
}
#else
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
{
- struct omap_hsmmc_data *priv = dev_get_priv(dev);
struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
struct mmc_config *cfg = &plat->cfg;
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int val;
- priv->base_addr = map_physmem(dev_get_addr(dev), sizeof(struct hsmmc *),
+ plat->base_addr = map_physmem(dev_get_addr(dev), sizeof(struct hsmmc *),
MAP_NOCACHE);
cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS;
@@ -809,11 +804,12 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
#ifdef OMAP_HSMMC_USE_GPIO
- priv->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
+ plat->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
#endif
return 0;
}
+#endif
#ifdef CONFIG_BLK
@@ -834,6 +830,10 @@ static int omap_hsmmc_probe(struct udevice *dev)
cfg->name = "OMAP SD/MMC";
cfg->ops = &omap_hsmmc_ops;
+ priv->base_addr = plat->base_addr;
+#ifdef OMAP_HSMMC_USE_GPIO
+ priv->cd_inverted = plat->cd_inverted;
+#endif
#ifdef CONFIG_BLK
mmc = &plat->mmc;
@@ -843,7 +843,7 @@ static int omap_hsmmc_probe(struct udevice *dev)
return -1;
#endif
-#ifdef OMAP_HSMMC_USE_GPIO
+#if defined(OMAP_HSMMC_USE_GPIO) && CONFIG_IS_ENABLED(OF_CONTROL)
gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
#endif
@@ -854,23 +854,27 @@ static int omap_hsmmc_probe(struct udevice *dev)
return 0;
}
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
static const struct udevice_id omap_hsmmc_ids[] = {
{ .compatible = "ti,omap3-hsmmc" },
{ .compatible = "ti,omap4-hsmmc" },
{ .compatible = "ti,am33xx-hsmmc" },
{ }
};
+#endif
U_BOOT_DRIVER(omap_hsmmc) = {
.name = "omap_hsmmc",
.id = UCLASS_MMC,
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap_hsmmc_ids,
.ofdata_to_platdata = omap_hsmmc_ofdata_to_platdata,
+ .platdata_auto_alloc_size = sizeof(struct omap_hsmmc_plat),
+#endif
#ifdef CONFIG_BLK
.bind = omap_hsmmc_bind,
#endif
.probe = omap_hsmmc_probe,
.priv_auto_alloc_size = sizeof(struct omap_hsmmc_data),
- .platdata_auto_alloc_size = sizeof(struct omap_hsmmc_plat),
};
#endif
--
2.11.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/6] dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata Lokesh Vutla
@ 2017-04-22 6:50 ` Lokesh Vutla
2017-04-25 21:09 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script Lokesh Vutla
` (3 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
For platforms that don't use device tree in SPL the only
way to mark this driver as 'required by relocation' is
with the DM_FLAG_PRE_RELOC flag. Add this to ensure that
the driver is bound.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
drivers/mmc/omap_hsmmc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index f2489473b0..d6194adc5e 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -876,5 +876,6 @@ U_BOOT_DRIVER(omap_hsmmc) = {
#endif
.probe = omap_hsmmc_probe,
.priv_auto_alloc_size = sizeof(struct omap_hsmmc_data),
+ .flags = DM_FLAG_PRE_RELOC,
};
#endif
--
2.11.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 2/6] dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver Lokesh Vutla
@ 2017-04-22 6:50 ` Lokesh Vutla
2017-04-24 15:23 ` Andrew F. Davis
2017-04-22 6:50 ` [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc Lokesh Vutla
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
No reason to use a separate load script for am33xx than using
omap-common load script.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
include/configs/am335x_evm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index fc8a08f5b7..796d5c32e9 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -194,7 +194,7 @@
/* USB gadget RNDIS */
-#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#endif
#ifdef CONFIG_NAND
--
2.11.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
` (2 preceding siblings ...)
2017-04-22 6:50 ` [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script Lokesh Vutla
@ 2017-04-22 6:50 ` Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 5/6] configs: am335x_evm: Enable SPL_DM Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 6/6] arm: am335x: Enable tiny printf in SPL Lokesh Vutla
5 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
board/ti/am335x/board.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 3e842d3187..566183e669 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <dm.h>
#include <errno.h>
#include <spl.h>
#include <serial.h>
@@ -26,6 +27,7 @@
#include <asm/emif.h>
#include <asm/gpio.h>
#include <asm/omap_sec_common.h>
+#include <asm/omap_mmc.h>
#include <i2c.h>
#include <miiphy.h>
#include <cpsw.h>
@@ -892,3 +894,33 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
secure_boot_verify_image(p_image, p_size);
}
#endif
+
+#if !CONFIG_IS_ENABLED(OF_CONTROL)
+static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
+ .base_addr = (struct hsmmc *)0x48060000,
+ .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
+ .cfg.f_min = 400000,
+ .cfg.f_max = 52000000,
+ .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
+ .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
+};
+
+U_BOOT_DEVICE(am335x_mmc0) = {
+ .name = "omap_hsmmc",
+ .platdata = &am335x_mmc0_platdata,
+};
+
+static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
+ .base_addr = (struct hsmmc *)0x481d8000,
+ .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT,
+ .cfg.f_min = 400000,
+ .cfg.f_max = 52000000,
+ .cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
+ .cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
+};
+
+U_BOOT_DEVICE(am335x_mmc1) = {
+ .name = "omap_hsmmc",
+ .platdata = &am335x_mmc1_platdata,
+};
+#endif
--
2.11.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 5/6] configs: am335x_evm: Enable SPL_DM
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
` (3 preceding siblings ...)
2017-04-22 6:50 ` [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc Lokesh Vutla
@ 2017-04-22 6:50 ` Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 6/6] arm: am335x: Enable tiny printf in SPL Lokesh Vutla
5 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
Enable SPL_DM on all AM335x based TI platforms.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/mach-omap2/am33xx/Kconfig | 5 +++++
include/configs/am335x_evm.h | 1 -
include/configs/ti_am335x_common.h | 2 ++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig
index cf5d95a26d..acdb88a702 100644
--- a/arch/arm/mach-omap2/am33xx/Kconfig
+++ b/arch/arm/mach-omap2/am33xx/Kconfig
@@ -29,6 +29,11 @@ config TARGET_AM335X_EVM
imply SPL_SERIAL_SUPPORT
imply SPL_WATCHDOG_SUPPORT
imply SPL_YMODEM_SUPPORT
+ imply SPL_SYS_MALLOC_SIMPLE
+ imply SPL_SEPARATE_BSS
+ imply SPL_DM
+ imply SPL_DM_SEQ_ALIAS
+ imply SPL_OF_LIBFDT
help
This option specifies support for the AM335x
GP and HS EVM development platforms. The AM335x
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 796d5c32e9..51c3d493c8 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -291,7 +291,6 @@
* DM support in SPL
*/
#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_MMC
#undef CONFIG_TIMER
#undef CONFIG_DM_USB
#endif
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index c0e4336eb0..e4c3c807f2 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -22,8 +22,10 @@
/* NS16550 Configuration */
#ifdef CONFIG_SPL_BUILD
#define CONFIG_SYS_NS16550_SERIAL
+#ifndef CONFIG_DM_SERIAL
#define CONFIG_SYS_NS16550_REG_SIZE (-4)
#endif
+#endif
#define CONFIG_SYS_NS16550_CLK 48000000
#ifndef CONFIG_SPL_BUILD
--
2.11.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 6/6] arm: am335x: Enable tiny printf in SPL
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
` (4 preceding siblings ...)
2017-04-22 6:50 ` [U-Boot] [PATCH 5/6] configs: am335x_evm: Enable SPL_DM Lokesh Vutla
@ 2017-04-22 6:50 ` Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
5 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-22 6:50 UTC (permalink / raw)
To: u-boot
am335x_evm SPL is very close to its limit in SRAM space.
Switch to use tiny printf to reclaim some size.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7812f21f36..7368f6b95c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -761,6 +761,7 @@ config AM33XX
bool "AM33XX SoC"
select ARCH_OMAP2
imply SYS_THUMB_BUILD
+ imply USE_TINY_PRINTF
help
Support for AM335x SOC from Texas Instruments.
The AM335x high performance SOC features a Cortex-A8
--
2.11.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script
2017-04-22 6:50 ` [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script Lokesh Vutla
@ 2017-04-24 15:23 ` Andrew F. Davis
2017-04-25 4:13 ` Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
0 siblings, 2 replies; 19+ messages in thread
From: Andrew F. Davis @ 2017-04-24 15:23 UTC (permalink / raw)
To: u-boot
On 04/22/2017 01:50 AM, Lokesh Vutla wrote:
> No reason to use a separate load script for am33xx than using
> omap-common load script.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> include/configs/am335x_evm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index fc8a08f5b7..796d5c32e9 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -194,7 +194,7 @@
>
> /* USB gadget RNDIS */
>
> -#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
> +#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
Can we make this change to all other am335x platforms? They all are
copy/paste from this config and now need to also be updated. After that
we should delete am33xx/u-boot-spl.lds.
> #endif
>
> #ifdef CONFIG_NAND
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script
2017-04-24 15:23 ` Andrew F. Davis
@ 2017-04-25 4:13 ` Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
1 sibling, 0 replies; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-25 4:13 UTC (permalink / raw)
To: u-boot
On Monday 24 April 2017 08:53 PM, Andrew F. Davis wrote:
> On 04/22/2017 01:50 AM, Lokesh Vutla wrote:
>> No reason to use a separate load script for am33xx than using
>> omap-common load script.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>> include/configs/am335x_evm.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
>> index fc8a08f5b7..796d5c32e9 100644
>> --- a/include/configs/am335x_evm.h
>> +++ b/include/configs/am335x_evm.h
>> @@ -194,7 +194,7 @@
>>
>> /* USB gadget RNDIS */
>>
>> -#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
>> +#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
>
> Can we make this change to all other am335x platforms? They all are
> copy/paste from this config and now need to also be updated. After that
> we should delete am33xx/u-boot-spl.lds.
okay. Ill also wait for Tom to comment on rest of the series, and then
post v2.
Thanks and regards,
Lokesh
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata
2017-04-22 6:50 ` [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata Lokesh Vutla
@ 2017-04-25 21:09 ` Tom Rini
0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2017-04-25 21:09 UTC (permalink / raw)
To: u-boot
On Sat, Apr 22, 2017 at 12:20:43PM +0530, Lokesh Vutla wrote:
> This is to aid platforms that uses OF_PLATDATA.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/8e9b4946/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 2/6] dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver
2017-04-22 6:50 ` [U-Boot] [PATCH 2/6] dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver Lokesh Vutla
@ 2017-04-25 21:09 ` Tom Rini
0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2017-04-25 21:09 UTC (permalink / raw)
To: u-boot
On Sat, Apr 22, 2017 at 12:20:44PM +0530, Lokesh Vutla wrote:
> For platforms that don't use device tree in SPL the only
> way to mark this driver as 'required by relocation' is
> with the DM_FLAG_PRE_RELOC flag. Add this to ensure that
> the driver is bound.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/aeec9e00/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script
2017-04-24 15:23 ` Andrew F. Davis
2017-04-25 4:13 ` Lokesh Vutla
@ 2017-04-25 21:10 ` Tom Rini
2017-04-26 6:14 ` Lokesh Vutla
1 sibling, 1 reply; 19+ messages in thread
From: Tom Rini @ 2017-04-25 21:10 UTC (permalink / raw)
To: u-boot
On Mon, Apr 24, 2017 at 10:23:17AM -0500, Andrew F. Davis wrote:
> On 04/22/2017 01:50 AM, Lokesh Vutla wrote:
> > No reason to use a separate load script for am33xx than using
> > omap-common load script.
> >
> > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> > ---
> > include/configs/am335x_evm.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> > index fc8a08f5b7..796d5c32e9 100644
> > --- a/include/configs/am335x_evm.h
> > +++ b/include/configs/am335x_evm.h
> > @@ -194,7 +194,7 @@
> >
> > /* USB gadget RNDIS */
> >
> > -#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
> > +#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
>
> Can we make this change to all other am335x platforms? They all are
> copy/paste from this config and now need to also be updated. After that
> we should delete am33xx/u-boot-spl.lds.
Agreed. It looks like d0b5d9da5de2 needs to be done to
arch/arm/mach-omap2/u-boot-spl.lds as well, btw.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/44c8f25f/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc
2017-04-22 6:50 ` [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc Lokesh Vutla
@ 2017-04-25 21:10 ` Tom Rini
2017-04-26 0:05 ` Adam Ford
0 siblings, 1 reply; 19+ messages in thread
From: Tom Rini @ 2017-04-25 21:10 UTC (permalink / raw)
To: u-boot
On Sat, Apr 22, 2017 at 12:20:46PM +0530, Lokesh Vutla wrote:
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> board/ti/am335x/board.c | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 3e842d3187..566183e669 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -9,6 +9,7 @@
> */
>
> #include <common.h>
> +#include <dm.h>
> #include <errno.h>
> #include <spl.h>
> #include <serial.h>
> @@ -26,6 +27,7 @@
> #include <asm/emif.h>
> #include <asm/gpio.h>
> #include <asm/omap_sec_common.h>
> +#include <asm/omap_mmc.h>
> #include <i2c.h>
> #include <miiphy.h>
> #include <cpsw.h>
> @@ -892,3 +894,33 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
> secure_boot_verify_image(p_image, p_size);
> }
> #endif
> +
> +#if !CONFIG_IS_ENABLED(OF_CONTROL)
> +static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
> + .base_addr = (struct hsmmc *)0x48060000,
OK. So, off the top of my head, from Adam's series about converting
omap3, OMAP_HSMMC1_BASE and company aren't defined correctly? Or we're
playing games with that 0x100 offset? I bring this up as since we have
defines for these base addresses already, we should make use of them,
but in this case first we'll have to do... something, yes?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/918e78b4/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 5/6] configs: am335x_evm: Enable SPL_DM
2017-04-22 6:50 ` [U-Boot] [PATCH 5/6] configs: am335x_evm: Enable SPL_DM Lokesh Vutla
@ 2017-04-25 21:10 ` Tom Rini
0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2017-04-25 21:10 UTC (permalink / raw)
To: u-boot
On Sat, Apr 22, 2017 at 12:20:47PM +0530, Lokesh Vutla wrote:
> Enable SPL_DM on all AM335x based TI platforms.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/2ba4c5fb/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 6/6] arm: am335x: Enable tiny printf in SPL
2017-04-22 6:50 ` [U-Boot] [PATCH 6/6] arm: am335x: Enable tiny printf in SPL Lokesh Vutla
@ 2017-04-25 21:10 ` Tom Rini
0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2017-04-25 21:10 UTC (permalink / raw)
To: u-boot
On Sat, Apr 22, 2017 at 12:20:48PM +0530, Lokesh Vutla wrote:
> am335x_evm SPL is very close to its limit in SRAM space.
> Switch to use tiny printf to reclaim some size.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/a569c4fd/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc
2017-04-25 21:10 ` Tom Rini
@ 2017-04-26 0:05 ` Adam Ford
2017-04-26 4:29 ` Lokesh Vutla
0 siblings, 1 reply; 19+ messages in thread
From: Adam Ford @ 2017-04-26 0:05 UTC (permalink / raw)
To: u-boot
On Tue, Apr 25, 2017 at 4:10 PM, Tom Rini <trini@konsulko.com> wrote:
> On Sat, Apr 22, 2017 at 12:20:46PM +0530, Lokesh Vutla wrote:
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>> board/ti/am335x/board.c | 32 ++++++++++++++++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>>
>> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
>> index 3e842d3187..566183e669 100644
>> --- a/board/ti/am335x/board.c
>> +++ b/board/ti/am335x/board.c
>> @@ -9,6 +9,7 @@
>> */
>>
>> #include <common.h>
>> +#include <dm.h>
>> #include <errno.h>
>> #include <spl.h>
>> #include <serial.h>
>> @@ -26,6 +27,7 @@
>> #include <asm/emif.h>
>> #include <asm/gpio.h>
>> #include <asm/omap_sec_common.h>
>> +#include <asm/omap_mmc.h>
>> #include <i2c.h>
>> #include <miiphy.h>
>> #include <cpsw.h>
>> @@ -892,3 +894,33 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
>> secure_boot_verify_image(p_image, p_size);
>> }
>> #endif
>> +
>> +#if !CONFIG_IS_ENABLED(OF_CONTROL)
>> +static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
>> + .base_addr = (struct hsmmc *)0x48060000,
>
> OK. So, off the top of my head, from Adam's series about converting
> omap3, OMAP_HSMMC1_BASE and company aren't defined correctly? Or we're
> playing games with that 0x100 offset? I bring this up as since we have
> defines for these base addresses already, we should make use of them,
> but in this case first we'll have to do... something, yes?
>
The base address for the AM335xx he has listed is correct at 0x480600,
however the offset is 0x100. Without without my patch I would expect
this to correctly. SYSCONFIG is at offset 0x110 and for OMAP3 the
offset would be 0x10. His patch looks like it supports the condition
without OF_CONTROL, so maybe using a #define here would be
appropriate, however without OF_CONFIG, I am guessing my patch would
break stuff.
I only did my series to eliminate the #ifdef stuff, but we might have
to add something like && !define (OF_CONTROL) to my series.
If you want to pull his in, I can rebase and resubmit my series
against his. I don't have an AM33xx or OMAP4+ to test, I only have a
DM3730 to test.
adam
> --
> Tom
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc
2017-04-26 0:05 ` Adam Ford
@ 2017-04-26 4:29 ` Lokesh Vutla
0 siblings, 0 replies; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-26 4:29 UTC (permalink / raw)
To: u-boot
Hi Adam,
On Wednesday 26 April 2017 05:35 AM, Adam Ford wrote:
> On Tue, Apr 25, 2017 at 4:10 PM, Tom Rini <trini@konsulko.com> wrote:
>> On Sat, Apr 22, 2017 at 12:20:46PM +0530, Lokesh Vutla wrote:
>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>> ---
>>> board/ti/am335x/board.c | 32 ++++++++++++++++++++++++++++++++
>>> 1 file changed, 32 insertions(+)
>>>
>>> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
>>> index 3e842d3187..566183e669 100644
>>> --- a/board/ti/am335x/board.c
>>> +++ b/board/ti/am335x/board.c
>>> @@ -9,6 +9,7 @@
>>> */
>>>
>>> #include <common.h>
>>> +#include <dm.h>
>>> #include <errno.h>
>>> #include <spl.h>
>>> #include <serial.h>
>>> @@ -26,6 +27,7 @@
>>> #include <asm/emif.h>
>>> #include <asm/gpio.h>
>>> #include <asm/omap_sec_common.h>
>>> +#include <asm/omap_mmc.h>
>>> #include <i2c.h>
>>> #include <miiphy.h>
>>> #include <cpsw.h>
>>> @@ -892,3 +894,33 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
>>> secure_boot_verify_image(p_image, p_size);
>>> }
>>> #endif
>>> +
>>> +#if !CONFIG_IS_ENABLED(OF_CONTROL)
>>> +static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
>>> + .base_addr = (struct hsmmc *)0x48060000,
>>
>> OK. So, off the top of my head, from Adam's series about converting
>> omap3, OMAP_HSMMC1_BASE and company aren't defined correctly? Or we're
>> playing games with that 0x100 offset? I bring this up as since we have
>> defines for these base addresses already, we should make use of them,
>> but in this case first we'll have to do... something, yes?
>>
>
> The base address for the AM335xx he has listed is correct at 0x480600,
> however the offset is 0x100. Without without my patch I would expect
> this to correctly. SYSCONFIG is at offset 0x110 and for OMAP3 the
> offset would be 0x10. His patch looks like it supports the condition
> without OF_CONTROL, so maybe using a #define here would be
> appropriate, however without OF_CONFIG, I am guessing my patch would
> break stuff.
Your patch[1] definitely make sense and this is how it is handled in
kernel as well. Please keep it as is. Ill re-base this series on top of
your series and send a v2.
[1] http://patchwork.ozlabs.org/patch/751300/
Thanks and regards,
Lokesh
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script
2017-04-25 21:10 ` Tom Rini
@ 2017-04-26 6:14 ` Lokesh Vutla
2017-04-26 11:25 ` Tom Rini
0 siblings, 1 reply; 19+ messages in thread
From: Lokesh Vutla @ 2017-04-26 6:14 UTC (permalink / raw)
To: u-boot
On Wednesday 26 April 2017 02:40 AM, Tom Rini wrote:
> On Mon, Apr 24, 2017 at 10:23:17AM -0500, Andrew F. Davis wrote:
>> On 04/22/2017 01:50 AM, Lokesh Vutla wrote:
>>> No reason to use a separate load script for am33xx than using
>>> omap-common load script.
>>>
>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>> ---
>>> include/configs/am335x_evm.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
>>> index fc8a08f5b7..796d5c32e9 100644
>>> --- a/include/configs/am335x_evm.h
>>> +++ b/include/configs/am335x_evm.h
>>> @@ -194,7 +194,7 @@
>>>
>>> /* USB gadget RNDIS */
>>>
>>> -#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
>>> +#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
>>
>> Can we make this change to all other am335x platforms? They all are
>> copy/paste from this config and now need to also be updated. After that
>> we should delete am33xx/u-boot-spl.lds.
>
> Agreed. It looks like d0b5d9da5de2 needs to be done to
> arch/arm/mach-omap2/u-boot-spl.lds as well, btw.
The mentioned commit takes care of mach-omap2/u-boot-spl.lds(It was
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds) as well. Or did I miss
something?
Thanks and regards,
Lokesh
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script
2017-04-26 6:14 ` Lokesh Vutla
@ 2017-04-26 11:25 ` Tom Rini
0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2017-04-26 11:25 UTC (permalink / raw)
To: u-boot
On Wed, Apr 26, 2017 at 11:44:13AM +0530, Lokesh Vutla wrote:
>
>
> On Wednesday 26 April 2017 02:40 AM, Tom Rini wrote:
> > On Mon, Apr 24, 2017 at 10:23:17AM -0500, Andrew F. Davis wrote:
> >> On 04/22/2017 01:50 AM, Lokesh Vutla wrote:
> >>> No reason to use a separate load script for am33xx than using
> >>> omap-common load script.
> >>>
> >>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> >>> ---
> >>> include/configs/am335x_evm.h | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> >>> index fc8a08f5b7..796d5c32e9 100644
> >>> --- a/include/configs/am335x_evm.h
> >>> +++ b/include/configs/am335x_evm.h
> >>> @@ -194,7 +194,7 @@
> >>>
> >>> /* USB gadget RNDIS */
> >>>
> >>> -#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
> >>> +#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
> >>
> >> Can we make this change to all other am335x platforms? They all are
> >> copy/paste from this config and now need to also be updated. After that
> >> we should delete am33xx/u-boot-spl.lds.
> >
> > Agreed. It looks like d0b5d9da5de2 needs to be done to
> > arch/arm/mach-omap2/u-boot-spl.lds as well, btw.
>
> The mentioned commit takes care of mach-omap2/u-boot-spl.lds(It was
> arch/arm/cpu/armv7/omap-common/u-boot-spl.lds) as well. Or did I miss
> something?
No, maybe I just mis-read the diff yesterday morning, sorry, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170426/454c2ed0/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2017-04-26 11:25 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-22 6:50 [U-Boot] [PATCH 0/6] arm: am335x: Enable SPL_DM Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 1/6] dm: mmc: omap_hsmmc: Update to support of-platdata Lokesh Vutla
2017-04-25 21:09 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 2/6] dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver Lokesh Vutla
2017-04-25 21:09 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 3/6] configs: am335x_evm: Use omap2 generic spl load script Lokesh Vutla
2017-04-24 15:23 ` Andrew F. Davis
2017-04-25 4:13 ` Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
2017-04-26 6:14 ` Lokesh Vutla
2017-04-26 11:25 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 4/6] am33xx: Provide platform data for mmc Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
2017-04-26 0:05 ` Adam Ford
2017-04-26 4:29 ` Lokesh Vutla
2017-04-22 6:50 ` [U-Boot] [PATCH 5/6] configs: am335x_evm: Enable SPL_DM Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
2017-04-22 6:50 ` [U-Boot] [PATCH 6/6] arm: am335x: Enable tiny printf in SPL Lokesh Vutla
2017-04-25 21:10 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.