From a47411110ce982a9c66ef039622f2e32cf9fab5f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 3 Sep 2014 17:37:02 -0600 Subject: dm: tegra: Set up a pre-reloc malloc() Allocate 1KB so that driver model can operate before relocation. Signed-off-by: Simon Glass --- include/configs/tegra-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index d27fceb..7852f9a 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -40,6 +40,7 @@ * Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */ +#define CONFIG_SYS_MALLOC_F_LEN (1 << 10) /* * NS16550 Configuration -- cgit v1.1 From 2fccd2d96badcdf6165658a99771a4c475586279 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 3 Sep 2014 17:37:03 -0600 Subject: tegra: Convert tegra GPIO driver to use driver model This is an implementation of GPIOs for Tegra that uses driver model. It has been tested on trimslice and also using the new iotrace feature. The implementation uses a top-level GPIO device (which has no actual GPIOS). Under this all the banks are created as separate GPIO devices. The GPIOs are named as per the Tegra datasheet/header files: A0..A7, B0..B7, ..., Z0..Z7, AA0..AA7, etc. Since driver model is not yet available before relocation, or in SPL, a special function is provided for seaboard's SPL code. Signed-off-by: Simon Glass --- include/configs/tegra-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 7852f9a..f1187f1 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -20,6 +20,7 @@ #define CONFIG_DM #define CONFIG_CMD_DM +#define CONFIG_DM_GPIO #define CONFIG_SYS_TIMER_RATE 1000000 #define CONFIG_SYS_TIMER_COUNTER NV_PA_TMRUS_BASE -- cgit v1.1 From 890fcefe2e20b30a3d98f667c2dcfb382b1de2e6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 4 Sep 2014 16:27:27 -0600 Subject: sandbox: Convert serial driver to use driver model Adjust the sandbox serial driver to use the new driver model uclass. The driver works much as before, but within the new framework. Signed-off-by: Simon Glass --- include/configs/sandbox.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/configs') diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index bf2d25c..f5fa4b3 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -31,6 +31,9 @@ #define CONFIG_DM_DEMO_SHAPE #define CONFIG_DM_GPIO #define CONFIG_DM_TEST +#define CONFIG_DM_SERIAL + +#define CONFIG_SYS_STDIO_DEREGISTER /* Number of bits in a C 'long' on this architecture */ #define CONFIG_SANDBOX_BITS_PER_LONG 64 -- cgit v1.1 From 858530a8c0a7ce7e573e513934804a00d6676813 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 4 Sep 2014 16:27:36 -0600 Subject: dm: tegra: Enable driver model for serial Use driver model for serial ports. Since Tegra now uses driver model for serial, adjust the definition of V_NS16550_CLK so that it is clear that this is only used for SPL. Signed-off-by: Simon Glass --- include/configs/tegra-common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index f1187f1..834b3d5 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -21,6 +21,9 @@ #define CONFIG_DM #define CONFIG_CMD_DM #define CONFIG_DM_GPIO +#ifndef CONFIG_SPL_BUILD +#define CONFIG_DM_SERIAL +#endif #define CONFIG_SYS_TIMER_RATE 1000000 #define CONFIG_SYS_TIMER_COUNTER NV_PA_TMRUS_BASE @@ -46,10 +49,14 @@ /* * NS16550 Configuration */ -#define CONFIG_SYS_NS16550 +#ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE (-4) #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK +#else +#define CONFIG_TEGRA_SERIAL +#endif +#define CONFIG_SYS_NS16550 /* * Common HW configuration. -- cgit v1.1