mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
dm: stv0991: Move serial to driver model
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
This commit is contained in:
@ -13,12 +13,25 @@
|
|||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
#include <dm/platdata.h>
|
||||||
|
#include <dm/platform_data/serial_pl01x.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
struct gpio_regs *const gpioa_regs =
|
struct gpio_regs *const gpioa_regs =
|
||||||
(struct gpio_regs *) GPIOA_BASE_ADDR;
|
(struct gpio_regs *) GPIOA_BASE_ADDR;
|
||||||
|
|
||||||
|
static const struct pl01x_serial_platdata serial_platdata = {
|
||||||
|
.base = 0x80406000,
|
||||||
|
.type = TYPE_PL011,
|
||||||
|
.clock = 2700 * 1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
U_BOOT_DEVICE(stv09911_serials) = {
|
||||||
|
.name = "serial_pl01x",
|
||||||
|
.platdata = &serial_platdata,
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SHOW_BOOT_PROGRESS
|
#ifdef CONFIG_SHOW_BOOT_PROGRESS
|
||||||
void show_boot_progress(int progress)
|
void show_boot_progress(int progress)
|
||||||
{
|
{
|
||||||
|
@ -28,14 +28,21 @@
|
|||||||
(PHYS_SDRAM_1_SIZE - CONFIG_ENV_SIZE)
|
(PHYS_SDRAM_1_SIZE - CONFIG_ENV_SIZE)
|
||||||
#define CONFIG_SYS_MAXARGS 16
|
#define CONFIG_SYS_MAXARGS 16
|
||||||
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 16 * 1024)
|
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 16 * 1024)
|
||||||
|
#define CONFIG_SYS_MALLOC_F_LEN 0x2000
|
||||||
|
|
||||||
|
#define CONFIG_DM
|
||||||
/* serial port (PL011) configuration */
|
/* serial port (PL011) configuration */
|
||||||
#define CONFIG_SYS_SERIAL0 0x80406000
|
|
||||||
#define CONFIG_PL011_SERIAL
|
|
||||||
#define CONFIG_CONS_INDEX 0
|
|
||||||
#define CONFIG_BAUDRATE 115200
|
#define CONFIG_BAUDRATE 115200
|
||||||
#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
|
#ifdef CONFIG_DM
|
||||||
#define CONFIG_PL011_CLOCK (2700 * 1000)
|
#define CONFIG_DM_SERIAL
|
||||||
|
#define CONFIG_PL01X_SERIAL
|
||||||
|
#else
|
||||||
|
#define CONFIG_SYS_SERIAL0 0x80406000
|
||||||
|
#define CONFIG_CONS_INDEX 0
|
||||||
|
#define CONFIG_PL011_SERIAL
|
||||||
|
#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
|
||||||
|
#define CONFIG_PL011_CLOCK (2700 * 1000)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* user interface */
|
/* user interface */
|
||||||
#define CONFIG_SYS_PROMPT "STV0991> "
|
#define CONFIG_SYS_PROMPT "STV0991> "
|
||||||
|
Reference in New Issue
Block a user