Merge branch 'next'
This commit is contained in:
commit
f2abce5336
|
@ -61,6 +61,7 @@ board-$(CONFIG_MACH_EDB9307A) := edb93xx
|
|||
board-$(CONFIG_MACH_EDB93012) := edb93xx
|
||||
board-$(CONFIG_MACH_EDB9315) := edb93xx
|
||||
board-$(CONFIG_MACH_EDB9315A) := edb93xx
|
||||
board-$(CONFIG_MACH_EUKREA_CPUIMX25) := eukrea_cpuimx25
|
||||
board-$(CONFIG_MACH_EUKREA_CPUIMX27) := eukrea_cpuimx27
|
||||
board-$(CONFIG_MACH_FREESCALE_MX25_3STACK) := freescale-mx25-3-stack
|
||||
board-$(CONFIG_MACH_FREESCALE_MX35_3STACK) := freescale-mx35-3-stack
|
||||
|
|
|
@ -0,0 +1,247 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# barebox version: 2010.03.0
|
||||
# Fri Mar 19 11:12:11 2010
|
||||
#
|
||||
# CONFIG_BOARD_LINKER_SCRIPT is not set
|
||||
CONFIG_GENERIC_LINKER_SCRIPT=y
|
||||
CONFIG_ARM=y
|
||||
|
||||
#
|
||||
# System Type
|
||||
#
|
||||
# CONFIG_ARCH_AT91 is not set
|
||||
# CONFIG_ARCH_AT91RM9200 is not set
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
CONFIG_ARCH_IMX=y
|
||||
# CONFIG_ARCH_NETX is not set
|
||||
# CONFIG_ARCH_OMAP is not set
|
||||
# CONFIG_ARCH_S3C24xx is not set
|
||||
|
||||
#
|
||||
# Processor Type
|
||||
#
|
||||
CONFIG_CPU_32=y
|
||||
CONFIG_CPU_ARM926T=y
|
||||
CONFIG_CPU_32v5=y
|
||||
|
||||
#
|
||||
# processor features
|
||||
#
|
||||
CONFIG_ARCH_TEXT_BASE=0x83f00000
|
||||
CONFIG_BOARDINFO="Eukrea CPUIMX25"
|
||||
CONFIG_ARCH_HAS_FEC_IMX=y
|
||||
CONFIG_ARCH_IMX_INTERNAL_BOOT=y
|
||||
|
||||
#
|
||||
# Freescale i.MX System-on-Chip
|
||||
#
|
||||
# CONFIG_ARCH_IMX1 is not set
|
||||
# CONFIG_ARCH_IMX21 is not set
|
||||
CONFIG_ARCH_IMX25=y
|
||||
# CONFIG_ARCH_IMX27 is not set
|
||||
# CONFIG_ARCH_IMX31 is not set
|
||||
# CONFIG_ARCH_IMX35 is not set
|
||||
CONFIG_MACH_EUKREA_CPUIMX25=y
|
||||
# CONFIG_MACH_FREESCALE_MX25_3STACK is not set
|
||||
|
||||
#
|
||||
# Board specific settings
|
||||
#
|
||||
|
||||
#
|
||||
# i.MX specific settings
|
||||
#
|
||||
# CONFIG_IMX_CLKO is not set
|
||||
# CONFIG_AEABI is not set
|
||||
|
||||
#
|
||||
# Arm specific settings
|
||||
#
|
||||
CONFIG_CMD_ARM_CPUINFO=y
|
||||
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
|
||||
CONFIG_GREGORIAN_CALENDER=y
|
||||
CONFIG_HAS_KALLSYMS=y
|
||||
CONFIG_HAS_MODULES=y
|
||||
CONFIG_CMD_MEMORY=y
|
||||
CONFIG_ENV_HANDLING=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
|
||||
#
|
||||
# General Settings
|
||||
#
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
|
||||
#
|
||||
# memory layout
|
||||
#
|
||||
CONFIG_HAVE_MMU=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_HAVE_CONFIGURABLE_TEXT_BASE=y
|
||||
CONFIG_TEXT_BASE=0x83f00000
|
||||
CONFIG_HAVE_CONFIGURABLE_MEMORY_LAYOUT=y
|
||||
CONFIG_MEMORY_LAYOUT_DEFAULT=y
|
||||
# CONFIG_MEMORY_LAYOUT_FIXED is not set
|
||||
CONFIG_STACK_SIZE=0x8000
|
||||
CONFIG_MALLOC_SIZE=0x1000000
|
||||
# CONFIG_BROKEN is not set
|
||||
# CONFIG_EXPERIMENTAL is not set
|
||||
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
|
||||
CONFIG_MACH_DO_LOWLEVEL_INIT=y
|
||||
CONFIG_PROMPT="barebox:"
|
||||
CONFIG_BAUDRATE=115200
|
||||
# CONFIG_LONGHELP is not set
|
||||
CONFIG_CBSIZE=1024
|
||||
CONFIG_MAXARGS=16
|
||||
CONFIG_SHELL_HUSH=y
|
||||
# CONFIG_SHELL_SIMPLE is not set
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_PROMPT_HUSH_PS2="cpuimx25>"
|
||||
CONFIG_CMDLINE_EDITING=y
|
||||
CONFIG_AUTO_COMPLETE=y
|
||||
CONFIG_DYNAMIC_CRC_TABLE=y
|
||||
# CONFIG_ERRNO_MESSAGES is not set
|
||||
CONFIG_TIMESTAMP=y
|
||||
CONFIG_CONSOLE_FULL=y
|
||||
CONFIG_CONSOLE_ACTIVATE_FIRST=y
|
||||
# CONFIG_OF_FLAT_TREE is not set
|
||||
CONFIG_PARTITION=y
|
||||
CONFIG_DEFAULT_ENVIRONMENT=y
|
||||
CONFIG_DEFAULT_ENVIRONMENT_PATH="board/eukrea_cpuimx25/env"
|
||||
|
||||
#
|
||||
# Debugging
|
||||
#
|
||||
# CONFIG_DEBUG_INFO is not set
|
||||
# CONFIG_ENABLE_FLASH_NOISE is not set
|
||||
# CONFIG_ENABLE_PARTITION_NOISE is not set
|
||||
# CONFIG_ENABLE_DEVICE_NOISE is not set
|
||||
|
||||
#
|
||||
# Commands
|
||||
#
|
||||
|
||||
#
|
||||
# scripting
|
||||
#
|
||||
CONFIG_CMD_EDIT=y
|
||||
CONFIG_CMD_SLEEP=y
|
||||
CONFIG_CMD_SAVEENV=y
|
||||
CONFIG_CMD_LOADENV=y
|
||||
CONFIG_CMD_EXPORT=y
|
||||
CONFIG_CMD_PRINTENV=y
|
||||
CONFIG_CMD_READLINE=y
|
||||
CONFIG_CMD_TRUE=y
|
||||
CONFIG_CMD_FALSE=y
|
||||
|
||||
#
|
||||
# file commands
|
||||
#
|
||||
CONFIG_CMD_LS=y
|
||||
CONFIG_CMD_RM=y
|
||||
CONFIG_CMD_CAT=y
|
||||
CONFIG_CMD_MKDIR=y
|
||||
CONFIG_CMD_RMDIR=y
|
||||
CONFIG_CMD_CP=y
|
||||
CONFIG_CMD_PWD=y
|
||||
CONFIG_CMD_CD=y
|
||||
CONFIG_CMD_MOUNT=y
|
||||
CONFIG_CMD_UMOUNT=y
|
||||
|
||||
#
|
||||
# console
|
||||
#
|
||||
CONFIG_CMD_CLEAR=y
|
||||
CONFIG_CMD_ECHO=y
|
||||
|
||||
#
|
||||
# memory
|
||||
#
|
||||
# CONFIG_CMD_LOADB is not set
|
||||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_CRC=y
|
||||
CONFIG_CMD_MTEST=y
|
||||
# CONFIG_CMD_MTEST_ALTERNATIVE is not set
|
||||
|
||||
#
|
||||
# flash
|
||||
#
|
||||
CONFIG_CMD_FLASH=y
|
||||
|
||||
#
|
||||
# booting
|
||||
#
|
||||
CONFIG_CMD_BOOTM=y
|
||||
# CONFIG_CMD_BOOTM_ZLIB is not set
|
||||
# CONFIG_CMD_BOOTM_BZLIB is not set
|
||||
# CONFIG_CMD_BOOTM_SHOW_TYPE is not set
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
CONFIG_CMD_BOOTU=y
|
||||
# CONFIG_CMD_LINUX16 is not set
|
||||
CONFIG_CMD_RESET=y
|
||||
CONFIG_CMD_GO=y
|
||||
CONFIG_CMD_TIMEOUT=y
|
||||
CONFIG_CMD_PARTITION=y
|
||||
CONFIG_CMD_TEST=y
|
||||
CONFIG_CMD_VERSION=y
|
||||
CONFIG_CMD_HELP=y
|
||||
CONFIG_CMD_DEVINFO=y
|
||||
CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_NET_DHCP=y
|
||||
# CONFIG_NET_RARP is not set
|
||||
# CONFIG_NET_NFS is not set
|
||||
CONFIG_NET_PING=y
|
||||
CONFIG_NET_TFTP=y
|
||||
|
||||
#
|
||||
# Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# serial drivers
|
||||
#
|
||||
# CONFIG_DRIVER_SERIAL_ARM_DCC is not set
|
||||
CONFIG_DRIVER_SERIAL_IMX=y
|
||||
# CONFIG_DRIVER_SERIAL_NS16550 is not set
|
||||
CONFIG_MIIPHY=y
|
||||
|
||||
#
|
||||
# Network drivers
|
||||
#
|
||||
# CONFIG_DRIVER_NET_SMC911X is not set
|
||||
# CONFIG_DRIVER_NET_SMC91111 is not set
|
||||
CONFIG_DRIVER_NET_FEC_IMX=y
|
||||
|
||||
#
|
||||
# SPI drivers
|
||||
#
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_I2C is not set
|
||||
|
||||
#
|
||||
# flash drivers
|
||||
#
|
||||
# CONFIG_DRIVER_CFI is not set
|
||||
CONFIG_NAND=y
|
||||
CONFIG_NAND_IMX=y
|
||||
CONFIG_NAND_IMX_BOOT=y
|
||||
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
|
||||
# CONFIG_MTD_NAND_ECC_SMC is not set
|
||||
CONFIG_MTD_NAND_IDS=y
|
||||
# CONFIG_ATA is not set
|
||||
# CONFIG_USB is not set
|
||||
# CONFIG_USB_GADGET is not set
|
||||
CONFIG_VIDEO=y
|
||||
CONFIG_DRIVER_VIDEO_IMX=y
|
||||
# CONFIG_IMXFB_DRIVER_VIDEO_IMX_OVERLAY is not set
|
||||
|
||||
#
|
||||
# Filesystem support
|
||||
#
|
||||
# CONFIG_FS_CRAMFS is not set
|
||||
CONFIG_FS_RAMFS=y
|
||||
CONFIG_FS_DEVFS=y
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_GENERIC_FIND_NEXT_BIT is not set
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# barebox version: 2.0.0-rc10
|
||||
# Fri Dec 18 11:47:22 2009
|
||||
# barebox version: 2010.05.0
|
||||
# Tue May 25 09:57:55 2010
|
||||
#
|
||||
# CONFIG_BOARD_LINKER_SCRIPT is not set
|
||||
CONFIG_GENERIC_LINKER_SCRIPT=y
|
||||
|
@ -12,6 +12,7 @@ CONFIG_ARM=y
|
|||
#
|
||||
# CONFIG_ARCH_AT91 is not set
|
||||
# CONFIG_ARCH_AT91RM9200 is not set
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
CONFIG_ARCH_IMX=y
|
||||
# CONFIG_ARCH_NETX is not set
|
||||
# CONFIG_ARCH_OMAP is not set
|
||||
|
@ -46,7 +47,7 @@ CONFIG_MACH_EUKREA_CPUIMX27=y
|
|||
# CONFIG_MACH_PCM038 is not set
|
||||
|
||||
#
|
||||
# Board specific settings
|
||||
# Board specific settings
|
||||
#
|
||||
CONFIG_EUKREA_CPUIMX27_SDRAM_128MB=y
|
||||
# CONFIG_EUKREA_CPUIMX27_SDRAM_256MB is not set
|
||||
|
@ -58,18 +59,15 @@ CONFIG_EUKREA_CPUIMX27_QUART1=y
|
|||
# CONFIG_EUKREA_CPUIMX27_QUART4 is not set
|
||||
|
||||
#
|
||||
# i.MX specific settings
|
||||
# i.MX specific settings
|
||||
#
|
||||
CONFIG_IMX_CLKO=y
|
||||
# CONFIG_AEABI is not set
|
||||
|
||||
#
|
||||
# Arm specific settings
|
||||
# Arm specific settings
|
||||
#
|
||||
CONFIG_CMD_ARM_CPUINFO=y
|
||||
CONFIG_CMDLINE_TAG=y
|
||||
CONFIG_SETUP_MEMORY_TAGS=y
|
||||
# CONFIG_INITRD_TAG is not set
|
||||
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
|
||||
CONFIG_GREGORIAN_CALENDER=y
|
||||
CONFIG_HAS_KALLSYMS=y
|
||||
|
@ -79,12 +77,12 @@ CONFIG_ENV_HANDLING=y
|
|||
CONFIG_GENERIC_GPIO=y
|
||||
|
||||
#
|
||||
# General Settings
|
||||
# General Settings
|
||||
#
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
|
||||
#
|
||||
# memory layout
|
||||
# memory layout
|
||||
#
|
||||
CONFIG_HAVE_MMU=y
|
||||
CONFIG_MMU=y
|
||||
|
@ -108,6 +106,7 @@ CONFIG_SHELL_HUSH=y
|
|||
# CONFIG_SHELL_SIMPLE is not set
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_PROMPT_HUSH_PS2="> "
|
||||
CONFIG_HUSH_FANCY_PROMPT=y
|
||||
CONFIG_CMDLINE_EDITING=y
|
||||
CONFIG_AUTO_COMPLETE=y
|
||||
CONFIG_DYNAMIC_CRC_TABLE=y
|
||||
|
@ -122,7 +121,7 @@ CONFIG_DEFAULT_ENVIRONMENT=y
|
|||
CONFIG_DEFAULT_ENVIRONMENT_PATH="board/eukrea_cpuimx27/env"
|
||||
|
||||
#
|
||||
# Debugging
|
||||
# Debugging
|
||||
#
|
||||
# CONFIG_DEBUG_INFO is not set
|
||||
# CONFIG_ENABLE_FLASH_NOISE is not set
|
||||
|
@ -130,11 +129,11 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="board/eukrea_cpuimx27/env"
|
|||
# CONFIG_ENABLE_DEVICE_NOISE is not set
|
||||
|
||||
#
|
||||
# Commands
|
||||
# Commands
|
||||
#
|
||||
|
||||
#
|
||||
# scripting
|
||||
# scripting
|
||||
#
|
||||
CONFIG_CMD_EDIT=y
|
||||
CONFIG_CMD_SLEEP=y
|
||||
|
@ -147,7 +146,7 @@ CONFIG_CMD_TRUE=y
|
|||
CONFIG_CMD_FALSE=y
|
||||
|
||||
#
|
||||
# file commands
|
||||
# file commands
|
||||
#
|
||||
CONFIG_CMD_LS=y
|
||||
CONFIG_CMD_RM=y
|
||||
|
@ -161,13 +160,14 @@ CONFIG_CMD_MOUNT=y
|
|||
CONFIG_CMD_UMOUNT=y
|
||||
|
||||
#
|
||||
# console
|
||||
# console
|
||||
#
|
||||
CONFIG_CMD_CLEAR=y
|
||||
CONFIG_CMD_ECHO=y
|
||||
CONFIG_CMD_ECHO_E=y
|
||||
|
||||
#
|
||||
# memory
|
||||
# memory
|
||||
#
|
||||
# CONFIG_CMD_LOADB is not set
|
||||
CONFIG_CMD_MEMINFO=y
|
||||
|
@ -176,19 +176,20 @@ CONFIG_CMD_MTEST=y
|
|||
# CONFIG_CMD_MTEST_ALTERNATIVE is not set
|
||||
|
||||
#
|
||||
# flash
|
||||
# flash
|
||||
#
|
||||
CONFIG_CMD_FLASH=y
|
||||
|
||||
#
|
||||
# booting
|
||||
# booting
|
||||
#
|
||||
CONFIG_CMD_BOOTM=y
|
||||
# CONFIG_CMD_BOOTM_ZLIB is not set
|
||||
# CONFIG_CMD_BOOTM_BZLIB is not set
|
||||
# CONFIG_CMD_BOOTM_SHOW_TYPE is not set
|
||||
CONFIG_CMD_BOOTM_SHOW_TYPE=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
CONFIG_CMD_BOOTU=y
|
||||
# CONFIG_CMD_LINUX16 is not set
|
||||
CONFIG_CMD_RESET=y
|
||||
CONFIG_CMD_GO=y
|
||||
CONFIG_CMD_TIMEOUT=y
|
||||
|
@ -197,7 +198,10 @@ CONFIG_CMD_TEST=y
|
|||
CONFIG_CMD_VERSION=y
|
||||
CONFIG_CMD_HELP=y
|
||||
CONFIG_CMD_DEVINFO=y
|
||||
CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_UNLZO=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_NET_DHCP=y
|
||||
# CONFIG_NET_RARP is not set
|
||||
|
@ -206,11 +210,11 @@ CONFIG_NET_PING=y
|
|||
CONFIG_NET_TFTP=y
|
||||
|
||||
#
|
||||
# Drivers
|
||||
# Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# serial drivers
|
||||
# serial drivers
|
||||
#
|
||||
# CONFIG_DRIVER_SERIAL_ARM_DCC is not set
|
||||
CONFIG_DRIVER_SERIAL_IMX=y
|
||||
|
@ -218,27 +222,33 @@ CONFIG_DRIVER_SERIAL_NS16550=y
|
|||
CONFIG_MIIPHY=y
|
||||
|
||||
#
|
||||
# Network drivers
|
||||
# Network drivers
|
||||
#
|
||||
# CONFIG_DRIVER_NET_SMC911X is not set
|
||||
# CONFIG_DRIVER_NET_SMC91111 is not set
|
||||
CONFIG_DRIVER_NET_FEC_IMX=y
|
||||
|
||||
#
|
||||
# SPI drivers
|
||||
# SPI drivers
|
||||
#
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DRIVER_SPI_IMX=y
|
||||
CONFIG_DRIVER_SPI_MC13783=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
CONFIG_I2C=y
|
||||
CONFIG_DRIVER_I2C_IMX=y
|
||||
# CONFIG_DRIVER_I2C_MC13892 is not set
|
||||
# CONFIG_DRIVER_I2C_MC9SDZ60 is not set
|
||||
CONFIG_DRIVER_I2C_LP3972=y
|
||||
|
||||
#
|
||||
# flash drivers
|
||||
# flash drivers
|
||||
#
|
||||
CONFIG_HAS_CFI=y
|
||||
CONFIG_DRIVER_CFI=y
|
||||
# CONFIG_DRIVER_CFI_NEW is not set
|
||||
CONFIG_DRIVER_CFI_OLD=y
|
||||
CONFIG_DRIVER_CFI_INTEL=y
|
||||
# CONFIG_DRIVER_CFI_AMD is not set
|
||||
# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set
|
||||
CONFIG_DRIVER_CFI_BANK_WIDTH_2=y
|
||||
# CONFIG_DRIVER_CFI_BANK_WIDTH_4 is not set
|
||||
# CONFIG_DRIVER_CFI_BANK_WIDTH_8 is not set
|
||||
CONFIG_CFI_BUFFER_WRITE=y
|
||||
CONFIG_NAND=y
|
||||
CONFIG_NAND_IMX=y
|
||||
|
@ -246,15 +256,20 @@ CONFIG_NAND_IMX=y
|
|||
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
|
||||
# CONFIG_MTD_NAND_ECC_SMC is not set
|
||||
CONFIG_MTD_NAND_IDS=y
|
||||
# CONFIG_ATA is not set
|
||||
# CONFIG_USB is not set
|
||||
# CONFIG_USB_GADGET is not set
|
||||
# CONFIG_VIDEO is not set
|
||||
CONFIG_VIDEO=y
|
||||
CONFIG_DRIVER_VIDEO_IMX=y
|
||||
# CONFIG_IMXFB_DRIVER_VIDEO_IMX_OVERLAY is not set
|
||||
|
||||
#
|
||||
# Filesystem support
|
||||
# Filesystem support
|
||||
#
|
||||
# CONFIG_FS_CRAMFS is not set
|
||||
CONFIG_FS_RAMFS=y
|
||||
CONFIG_FS_DEVFS=y
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_GENERIC_FIND_NEXT_BIT is not set
|
||||
CONFIG_PROCESS_ESCAPE_SEQUENCE=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
void armlinux_set_bootparams(void *params);
|
||||
void armlinux_set_architecture(int architecture);
|
||||
void armlinux_add_dram(struct device_d *dev);
|
||||
void armlinux_set_revision(unsigned int);
|
||||
#else
|
||||
static inline void armlinux_set_bootparams(void *params)
|
||||
{
|
||||
|
@ -18,6 +19,11 @@ static inline void armlinux_set_architecture(int architecture)
|
|||
static inline void armlinux_add_dram(struct device_d *dev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void armlinux_set_revision(unsigned int)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARMLINUX_H */
|
||||
|
|
|
@ -44,6 +44,8 @@ static struct tag *params;
|
|||
static int armlinux_architecture = 0;
|
||||
static void *armlinux_bootparams = NULL;
|
||||
|
||||
static unsigned int system_rev;
|
||||
|
||||
static void setup_start_tag(void)
|
||||
{
|
||||
params = (struct tag *)armlinux_bootparams;
|
||||
|
@ -106,6 +108,18 @@ static void setup_commandline_tag(const char *commandline)
|
|||
params = tag_next(params);
|
||||
}
|
||||
|
||||
static void setup_revision_tag(void)
|
||||
{
|
||||
if (system_rev) {
|
||||
params->hdr.tag = ATAG_REVISION;
|
||||
params->hdr.size = tag_size(tag_revision);
|
||||
|
||||
params->u.revision.rev = system_rev;
|
||||
|
||||
params = tag_next(params);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void setup_initrd_tag(ulong initrd_start, ulong initrd_end)
|
||||
{
|
||||
|
@ -147,6 +161,12 @@ void armlinux_add_dram(struct device_d *dev)
|
|||
list_add_tail(&mem->list, &memory_list);
|
||||
}
|
||||
|
||||
void armlinux_set_revision(unsigned int rev)
|
||||
{
|
||||
system_rev = rev;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_CMD_BOOTM
|
||||
int do_bootm_linux(struct image_data *data)
|
||||
{
|
||||
|
@ -184,6 +204,7 @@ int do_bootm_linux(struct image_data *data)
|
|||
if (initrd_start && initrd_end)
|
||||
setup_initrd_tag (initrd_start, initrd_end);
|
||||
#endif
|
||||
setup_revision_tag();
|
||||
setup_end_tag();
|
||||
|
||||
if (relocate_image(data->os, (void *)ntohl(os_header->ih_load)))
|
||||
|
@ -281,6 +302,7 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[])
|
|||
if (initrd_start && initrd_end)
|
||||
setup_initrd_tag (initrd_start, initrd_end);
|
||||
#endif
|
||||
setup_revision_tag();
|
||||
setup_end_tag();
|
||||
|
||||
shutdown_barebox();
|
||||
|
@ -323,6 +345,7 @@ static int do_bootu(struct command *cmdtp, int argc, char *argv[])
|
|||
setup_start_tag();
|
||||
setup_memory_tags();
|
||||
setup_commandline_tag(commandline);
|
||||
setup_revision_tag();
|
||||
setup_end_tag();
|
||||
|
||||
shutdown_barebox();
|
||||
|
|
|
@ -2,6 +2,7 @@ if ARCH_IMX
|
|||
|
||||
config ARCH_TEXT_BASE
|
||||
hex
|
||||
default 0x83f00000 if MACH_EUKREA_CPUIMX25
|
||||
default 0xa0000000 if MACH_EUKREA_CPUIMX27
|
||||
default 0x08f00000 if MACH_MX1ADS
|
||||
default 0xc0000000 if MACH_IMX21ADS
|
||||
|
@ -16,6 +17,7 @@ config ARCH_TEXT_BASE
|
|||
default 0x08f80000 if MACH_SCB9328
|
||||
|
||||
config BOARDINFO
|
||||
default "Eukrea CPUIMX25" if MACH_EUKREA_CPUIMX25
|
||||
default "Eukrea CPUIMX27" if MACH_EUKREA_CPUIMX27
|
||||
default "Freescale i.MX21 ADS" if MACH_IMX21ADS
|
||||
default "Freescale i.MX27 ADS" if MACH_IMX27ADS
|
||||
|
@ -124,6 +126,14 @@ choice
|
|||
|
||||
prompt "i.MX25 Board Type"
|
||||
|
||||
config MACH_EUKREA_CPUIMX25
|
||||
bool "Eukrea CPUIMX25"
|
||||
select MACH_HAS_LOWLEVEL_INIT
|
||||
select HAVE_MMU
|
||||
help
|
||||
Say Y here if you are using the Eukrea Electromatique's CPUIMX25
|
||||
equipped with a Freescale i.MX25 Processor
|
||||
|
||||
config MACH_FREESCALE_MX25_3STACK
|
||||
bool "Freescale MX25 3stack"
|
||||
select HAS_CFI
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/imx-regs.h>
|
||||
#include <mach/generic.h>
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
|
@ -27,3 +30,11 @@ void *imx_gpio_base[] = {
|
|||
|
||||
int imx_gpio_count = ARRAY_SIZE(imx_gpio_base) * 32;
|
||||
|
||||
int imx_silicon_revision()
|
||||
{
|
||||
uint32_t reg;
|
||||
reg = readl(IMX_IIM_BASE + IIM_SREV);
|
||||
reg += IMX35_CHIP_REVISION_1_0;
|
||||
|
||||
return (reg & 0xFF);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,11 @@ int imx_silicon_revision(void);
|
|||
#define IMX27_CHIP_REVISION_1_0 0
|
||||
#define IMX27_CHIP_REVISION_2_0 1
|
||||
|
||||
#define IMX35_CHIP_REVISION_1_0 0x10
|
||||
#define IMX35_CHIP_REVISION_2_0 0x20
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_ARCH_IMX1
|
||||
#define cpu_is_mx1() (1)
|
||||
#else
|
||||
|
|
|
@ -76,6 +76,24 @@
|
|||
#define PDR0_AUTO_CON (1 << 0)
|
||||
#define PDR0_PER_SEL (1 << 26)
|
||||
|
||||
|
||||
#define IIM_STAT 0x0000
|
||||
#define IIM_STATM 0x0004
|
||||
#define IIM_ERR 0x0008
|
||||
#define IIM_EMASK 0x000C
|
||||
#define IIM_FCTL 0x0010
|
||||
#define IIM_UA 0x0014
|
||||
#define IIM_LA 0x0018
|
||||
#define IIM_SDAT 0x001C
|
||||
#define IIM_PREV 0x0020
|
||||
#define IIM_SREV 0x0024
|
||||
#define IIM_PREG_P 0x0028
|
||||
#define IIM_SCS0 0x002C
|
||||
#define IIM_SCS1 0x0030
|
||||
#define IIM_SCS2 0x0034
|
||||
#define IIM_SCS3 0x0038
|
||||
|
||||
|
||||
/*
|
||||
* Adresses and ranges of the external chip select lines
|
||||
*/
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#
|
||||
# http://www.arm.linux.org.uk/developer/machines/?action=new
|
||||
#
|
||||
# Last update: Mon Mar 15 15:32:14 2010
|
||||
# Last update: Mon May 24 21:27:47 2010
|
||||
#
|
||||
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
|
||||
#
|
||||
|
@ -1777,7 +1777,7 @@ wdg002 MACH_WDG002 WDG002 1785
|
|||
sg560adsl MACH_SG560ADSL SG560ADSL 1786
|
||||
nextio_n2800_ica MACH_NEXTIO_N2800_ICA NEXTIO_N2800_ICA 1787
|
||||
dove_db MACH_DOVE_DB DOVE_DB 1788
|
||||
marvell_newdb MACH_MARVELL_NEWDB MARVELL_NEWDB 1789
|
||||
dove_avng MACH_MARVELL_NEWDB MARVELL_NEWDB 1789
|
||||
vandihud MACH_VANDIHUD VANDIHUD 1790
|
||||
magx_e8 MACH_MAGX_E8 MAGX_E8 1791
|
||||
magx_z6 MACH_MAGX_Z6 MAGX_Z6 1792
|
||||
|
@ -2308,7 +2308,7 @@ ecac2378 MACH_ECAC2378 ECAC2378 2319
|
|||
tazkiosk MACH_TAZKIOSK TAZKIOSK 2320
|
||||
whiterabbit_mch MACH_WHITERABBIT_MCH WHITERABBIT_MCH 2321
|
||||
sbox9263 MACH_SBOX9263 SBOX9263 2322
|
||||
oreo MACH_OREO OREO 2323
|
||||
oreo_camera MACH_OREO OREO 2323
|
||||
smdk6442 MACH_SMDK6442 SMDK6442 2324
|
||||
openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325
|
||||
incredible MACH_INCREDIBLE INCREDIBLE 2326
|
||||
|
@ -2498,7 +2498,7 @@ hiram MACH_HIRAM HIRAM 2510
|
|||
phy3250 MACH_PHY3250 PHY3250 2511
|
||||
ea3250 MACH_EA3250 EA3250 2512
|
||||
fdi3250 MACH_FDI3250 FDI3250 2513
|
||||
whitestone MACH_WHITESTONE WHITESTONE 2514
|
||||
htcwhitestone MACH_WHITESTONE WHITESTONE 2514
|
||||
at91sam9263nit MACH_AT91SAM9263NIT AT91SAM9263NIT 2515
|
||||
ccmx51 MACH_CCMX51 CCMX51 2516
|
||||
ccmx51js MACH_CCMX51JS CCMX51JS 2517
|
||||
|
@ -2582,7 +2582,7 @@ omap3_bulldog MACH_OMAP3_BULLDOG OMAP3_BULLDOG 2594
|
|||
pca101 MACH_PCA101 PCA101 2595
|
||||
buzzc MACH_BUZZC BUZZC 2596
|
||||
sasie2 MACH_SASIE2 SASIE2 2597
|
||||
davinci_cio MACH_DAVINCI_CIO DAVINCI_CIO 2598
|
||||
davinci_dm6467_cio MACH_DAVINCI_CIO DAVINCI_CIO 2598
|
||||
smartmeter_dl MACH_SMARTMETER_DL SMARTMETER_DL 2599
|
||||
wzl6410 MACH_WZL6410 WZL6410 2600
|
||||
wzl6410m MACH_WZL6410M WZL6410M 2601
|
||||
|
@ -2736,3 +2736,126 @@ bcmring_tablet_v1 MACH_BCMRING_TABLET_V1 BCMRING_TABLET_V1 2748
|
|||
sgarm10 MACH_SGARM10 SGARM10 2749
|
||||
cm_t3517 MACH_CM_T3517 CM_T3517 2750
|
||||
omap3_cps MACH_OMAP3_CPS OMAP3_CPS 2751
|
||||
axar1500_receiver MACH_AXAR1500_RECEIVER AXAR1500_RECEIVER 2752
|
||||
wbd222 MACH_WBD222 WBD222 2753
|
||||
mt65xx MACH_MT65XX MT65XX 2754
|
||||
msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755
|
||||
msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756
|
||||
vmc300 MACH_VMC300 VMC300 2757
|
||||
tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758
|
||||
nanos MACH_NANOS NANOS 2759
|
||||
stamp9g10 MACH_STAMP9G10 STAMP9G10 2760
|
||||
stamp9g45 MACH_STAMP9G45 STAMP9G45 2761
|
||||
h6053 MACH_H6053 H6053 2762
|
||||
smint01 MACH_SMINT01 SMINT01 2763
|
||||
prtlvt2 MACH_PRTLVT2 PRTLVT2 2764
|
||||
ap420 MACH_AP420 AP420 2765
|
||||
htcclio MACH_HTCSHIFT HTCSHIFT 2766
|
||||
davinci_dm365_fc MACH_DAVINCI_DM365_FC DAVINCI_DM365_FC 2767
|
||||
msm8x55_surf MACH_MSM8X55_SURF MSM8X55_SURF 2768
|
||||
msm8x55_ffa MACH_MSM8X55_FFA MSM8X55_FFA 2769
|
||||
esl_vamana MACH_ESL_VAMANA ESL_VAMANA 2770
|
||||
sbc35 MACH_SBC35 SBC35 2771
|
||||
mpx6446 MACH_MPX6446 MPX6446 2772
|
||||
oreo_controller MACH_OREO_CONTROLLER OREO_CONTROLLER 2773
|
||||
kopin_models MACH_KOPIN_MODELS KOPIN_MODELS 2774
|
||||
ttc_vision2 MACH_TTC_VISION2 TTC_VISION2 2775
|
||||
cns3420vb MACH_CNS3420VB CNS3420VB 2776
|
||||
lpc_evo MACH_LPC2 LPC2 2777
|
||||
olympus MACH_OLYMPUS OLYMPUS 2778
|
||||
vortex MACH_VORTEX VORTEX 2779
|
||||
s5pc200 MACH_S5PC200 S5PC200 2780
|
||||
ecucore_9263 MACH_ECUCORE_9263 ECUCORE_9263 2781
|
||||
smdkc200 MACH_SMDKC200 SMDKC200 2782
|
||||
emsiso_sx27 MACH_EMSISO_SX27 EMSISO_SX27 2783
|
||||
apx_som9g45_ek MACH_APX_SOM9G45_EK APX_SOM9G45_EK 2784
|
||||
songshan MACH_SONGSHAN SONGSHAN 2785
|
||||
tianshan MACH_TIANSHAN TIANSHAN 2786
|
||||
vpx500 MACH_VPX500 VPX500 2787
|
||||
am3517sam MACH_AM3517SAM AM3517SAM 2788
|
||||
skat91_sim508 MACH_SKAT91_SIM508 SKAT91_SIM508 2789
|
||||
skat91_s3e MACH_SKAT91_S3E SKAT91_S3E 2790
|
||||
omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791
|
||||
df7220 MACH_DF7220 DF7220 2792
|
||||
nemini MACH_NEMINI NEMINI 2793
|
||||
t8200 MACH_T8200 T8200 2794
|
||||
apf51 MACH_APF51 APF51 2795
|
||||
dr_rc_unit MACH_DR_RC_UNIT DR_RC_UNIT 2796
|
||||
bordeaux MACH_BORDEAUX BORDEAUX 2797
|
||||
catania_b MACH_CATANIA_B CATANIA_B 2798
|
||||
mx51_ocean MACH_MX51_OCEAN MX51_OCEAN 2799
|
||||
ti8168evm MACH_TI8168EVM TI8168EVM 2800
|
||||
neocoreomap MACH_NEOCOREOMAP NEOCOREOMAP 2801
|
||||
withings_wbp MACH_WITHINGS_WBP WITHINGS_WBP 2802
|
||||
dbps MACH_DBPS DBPS 2803
|
||||
at91sam9261 MACH_SBC9261 SBC9261 2804
|
||||
pcbfp0001 MACH_PCBFP0001 PCBFP0001 2805
|
||||
speedy MACH_SPEEDY SPEEDY 2806
|
||||
chrysaor MACH_CHRYSAOR CHRYSAOR 2807
|
||||
tango MACH_TANGO TANGO 2808
|
||||
synology_dsx11 MACH_SYNOLOGY_DSX11 SYNOLOGY_DSX11 2809
|
||||
hanlin_v3ext MACH_HANLIN_V3EXT HANLIN_V3EXT 2810
|
||||
hanlin_v5 MACH_HANLIN_V5 HANLIN_V5 2811
|
||||
hanlin_v3plus MACH_HANLIN_V3PLUS HANLIN_V3PLUS 2812
|
||||
iriver_story MACH_IRIVER_STORY IRIVER_STORY 2813
|
||||
irex_iliad MACH_IREX_ILIAD IREX_ILIAD 2814
|
||||
irex_dr1000 MACH_IREX_DR1000 IREX_DR1000 2815
|
||||
teton_bga MACH_TETON_BGA TETON_BGA 2816
|
||||
snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817
|
||||
tam3517 MACH_TAM3517 TAM3517 2818
|
||||
pdc100 MACH_PDC100 PDC100 2819
|
||||
eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820
|
||||
eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821
|
||||
eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822
|
||||
eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823
|
||||
p565 MACH_P565 P565 2824
|
||||
acer_a4 MACH_ACER_A4 ACER_A4 2825
|
||||
davinci_dm368_bip MACH_DAVINCI_DM368_BIP DAVINCI_DM368_BIP 2826
|
||||
eshare MACH_ESHARE ESHARE 2827
|
||||
hw_omapl138_europa MACH_HW_OMAPL138_EUROPA HW_OMAPL138_EUROPA 2828
|
||||
wlbargn MACH_WLBARGN WLBARGN 2829
|
||||
bm170 MACH_BM170 BM170 2830
|
||||
netspace_mini_v2 MACH_NETSPACE_MINI_V2 NETSPACE_MINI_V2 2831
|
||||
netspace_plug_v2 MACH_NETSPACE_PLUG_V2 NETSPACE_PLUG_V2 2832
|
||||
siemens_l1 MACH_SIEMENS_L1 SIEMENS_L1 2833
|
||||
elv_lcu1 MACH_ELV_LCU1 ELV_LCU1 2834
|
||||
mcu1 MACH_MCU1 MCU1 2835
|
||||
omap3_tao3530 MACH_OMAP3_TAO3530 OMAP3_TAO3530 2836
|
||||
omap3_pcutouch MACH_OMAP3_PCUTOUCH OMAP3_PCUTOUCH 2837
|
||||
smdkc210 MACH_SMDKC210 SMDKC210 2838
|
||||
omap3_braillo MACH_OMAP3_BRAILLO OMAP3_BRAILLO 2839
|
||||
spyplug MACH_SPYPLUG SPYPLUG 2840
|
||||
ginger MACH_GINGER GINGER 2841
|
||||
tny_t3530 MACH_TNY_T3530 TNY_T3530 2842
|
||||
pca102 MACH_PCA102 PCA102 2843
|
||||
spade MACH_SPADE SPADE 2844
|
||||
mxc25_topaz MACH_MXC25_TOPAZ MXC25_TOPAZ 2845
|
||||
t5325 MACH_T5325 T5325 2846
|
||||
gw2361 MACH_GW2361 GW2361 2847
|
||||
elog MACH_ELOG ELOG 2848
|
||||
income MACH_INCOME INCOME 2849
|
||||
bcm589x MACH_BCM589X BCM589X 2850
|
||||
etna MACH_ETNA ETNA 2851
|
||||
hawks MACH_HAWKS HAWKS 2852
|
||||
meson MACH_MESON MESON 2853
|
||||
xsbase255 MACH_XSBASE255 XSBASE255 2854
|
||||
pvm2030 MACH_PVM2030 PVM2030 2855
|
||||
mioa502 MACH_MIOA502 MIOA502 2856
|
||||
vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857
|
||||
vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858
|
||||
vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859
|
||||
htc_spv_m700 MACH_HTC_SPV_M700 HTC_SPV_M700 2860
|
||||
mx257sx MACH_MX257SX MX257SX 2861
|
||||
goni MACH_GONI GONI 2862
|
||||
msm8x55_svlte_ffa MACH_MSM8X55_SVLTE_FFA MSM8X55_SVLTE_FFA 2863
|
||||
msm8x55_svlte_surf MACH_MSM8X55_SVLTE_SURF MSM8X55_SVLTE_SURF 2864
|
||||
quickstep MACH_QUICKSTEP QUICKSTEP 2865
|
||||
dmw96 MACH_DMW96 DMW96 2866
|
||||
hammerhead MACH_HAMMERHEAD HAMMERHEAD 2867
|
||||
trident MACH_TRIDENT TRIDENT 2868
|
||||
lightning MACH_LIGHTNING LIGHTNING 2869
|
||||
iconnect MACH_ICONNECT ICONNECT 2870
|
||||
autobot MACH_AUTOBOT AUTOBOT 2871
|
||||
coconut MACH_COCONUT COCONUT 2872
|
||||
durian MACH_DURIAN DURIAN 2873
|
||||
cayenne MACH_CAYENNE CAYENNE 2874
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# (C) 2010 Eukrea Electromatique, Eric Bénard <eric@eukrea.com>
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
obj-y += lowlevel.o
|
||||
obj-y += eukrea_cpuimx25.o
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* (c) 2010 Eukrea Electromatique, Eric Bénard <eric@eukrea.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
#define CONFIG_MX25_HCLK_FREQ 24000000
|
||||
|
||||
#endif
|
||||
|
||||
/* nothing to do here yet */
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$part" -o -z "$image" ]; then
|
||||
echo "define \$part and \$image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "$part" ]; then
|
||||
echo "Partition $part does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# = 1 ]; then
|
||||
image=$1
|
||||
fi
|
||||
|
||||
if [ x$ip = xdhcp ]; then
|
||||
dhcp
|
||||
fi
|
||||
|
||||
ping $eth0.serverip
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "update aborted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
unprotect $part
|
||||
|
||||
echo
|
||||
echo "erasing partition $part"
|
||||
erase $part
|
||||
|
||||
echo
|
||||
echo "flashing $image to $part"
|
||||
echo
|
||||
tftp $image $part
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /env/config
|
||||
|
||||
if [ x$1 = xjffS2 ]; then
|
||||
root=jffs2
|
||||
kernel=nand
|
||||
fi
|
||||
|
||||
if [ x$1 = xubifs ]; then
|
||||
root=ubifs
|
||||
kernel=nand
|
||||
fi
|
||||
|
||||
if [ x$1 = xnet ]; then
|
||||
root=net
|
||||
kernel=net
|
||||
fi
|
||||
|
||||
if [ x$ip = xdhcp ]; then
|
||||
bootargs="$bootargs ip=dhcp"
|
||||
else
|
||||
if [ x$ip = xoff ]; then
|
||||
bootargs="$bootargs ip=off"
|
||||
else
|
||||
bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ x$root = xjffs2 ]; then
|
||||
bootargs="$bootargs root=/dev/mtdblock$rootpartnum_nand rootfstype=jffs2"
|
||||
fi
|
||||
|
||||
if [ x$root = xubifs ]; then
|
||||
bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootpartnum_nand rootfstype=ubifs"
|
||||
fi
|
||||
|
||||
if [ x$root = xnet ]; then
|
||||
bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
|
||||
fi
|
||||
|
||||
bootargs="$bootargs mtdparts=mxc_nand:$nand_parts"
|
||||
|
||||
if [ $kernel = net ]; then
|
||||
if [ x$ip = xdhcp ]; then
|
||||
dhcp
|
||||
fi
|
||||
tftp $uimage uImage || exit 1
|
||||
bootm uImage
|
||||
else
|
||||
bootm /dev/nand0.kernel.bb
|
||||
fi
|
||||
|
|
@ -0,0 +1 @@
|
|||
nand -a /dev/nand0.*
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
PATH=/env/bin
|
||||
export PATH
|
||||
|
||||
. /env/config
|
||||
if [ -e /dev/nand0 ]; then
|
||||
addpart /dev/nand0 $nand_parts
|
||||
|
||||
# Uh, oh, hush first expands wildcards and then starts executing
|
||||
# commands. What a bug!
|
||||
source /env/bin/hush_hack
|
||||
fi
|
||||
|
||||
if [ -f /env/logo.bmp ]; then
|
||||
bmp /env/logo.bmp
|
||||
fi
|
||||
|
||||
if [ -z $eth0.ethaddr ]; then
|
||||
while [ -z $eth0.ethaddr ]; do
|
||||
readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr
|
||||
done
|
||||
echo -a /env/config "eth0.ethaddr=$eth0.ethaddr"
|
||||
saveenv
|
||||
fi
|
||||
|
||||
echo
|
||||
echo -n "Hit any key to stop autoboot: "
|
||||
timeout -a $autoboot_timeout
|
||||
if [ $? != 0 ]; then
|
||||
echo
|
||||
echo "type update_kernel [<imagename>] to update kernel into flash"
|
||||
echo "type update_root [<imagename>] to update rootfs into flash"
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
|
||||
boot
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /env/config
|
||||
|
||||
image=$uimage
|
||||
part=/dev/nand0.kernel.bb
|
||||
|
||||
. /env/bin/_update $1
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /env/config
|
||||
|
||||
image=$rootfs
|
||||
part=/dev/nand0.root.bb
|
||||
|
||||
. /env/bin/_update $1
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
# can be either 'net' or 'jffs2' or 'ubifs'
|
||||
kernel=nand
|
||||
root=ubifs
|
||||
|
||||
basedir=cpuimx25
|
||||
uimage=$basedir/uImage
|
||||
rootfs=$basedir/rootfs
|
||||
|
||||
autoboot_timeout=1
|
||||
|
||||
nfsroot=""
|
||||
bootargs="console=ttymxc0,115200"
|
||||
|
||||
nand_parts="256k(barebox)ro,128k(bareboxenv),2176k(kernel),-(root)"
|
||||
rootpartnum_nand=3
|
||||
ubiroot="eukrea-cpuimx25-rootfs"
|
||||
|
||||
# use 'dhcp' to do dhcp in barebox and in kernel
|
||||
ip=off
|
||||
|
||||
# or set your networking parameters here
|
||||
#eth0.ipaddr=a.b.c.d
|
||||
#eth0.netmask=a.b.c.d
|
||||
#eth0.gateway=a.b.c.d
|
||||
#eth0.serverip=a.b.c.d
|
|
@ -0,0 +1,275 @@
|
|||
/*
|
||||
* (C) 2009 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
|
||||
* (c) 2010 Eukrea Electromatique, Eric Bénard <eric@eukrea.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <driver.h>
|
||||
#include <environment.h>
|
||||
#include <mach/imx-regs.h>
|
||||
#include <asm/armlinux.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
#include <partition.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/imx-nand.h>
|
||||
#include <mach/imxfb.h>
|
||||
#include <fec.h>
|
||||
#include <nand.h>
|
||||
#include <mach/imx-flash-header.h>
|
||||
#include <mach/iomux-mx25.h>
|
||||
|
||||
extern unsigned long _stext;
|
||||
|
||||
void __naked __flash_header_start go(void)
|
||||
{
|
||||
__asm__ __volatile__("b exception_vectors\n");
|
||||
}
|
||||
|
||||
struct imx_dcd_entry __dcd_entry_0x400 dcd_entry[] = {
|
||||
{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000004, },
|
||||
{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x92100000, },
|
||||
{ .ptr_type = 1, .addr = 0x80000400, .val = 0x12344321, },
|
||||
{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xa2100000, },
|
||||
{ .ptr_type = 4, .addr = 0x80000000, .val = 0x12344321, },
|
||||
{ .ptr_type = 4, .addr = 0x80000000, .val = 0x12344321, },
|
||||
{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xb2100000, },
|
||||
{ .ptr_type = 1, .addr = 0x80000033, .val = 0xda, },
|
||||
{ .ptr_type = 1, .addr = 0x81000000, .val = 0xff, },
|
||||
{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x82216080, },
|
||||
{ .ptr_type = 4, .addr = 0xb8001004, .val = 0x00295729, },
|
||||
{ .ptr_type = 4, .addr = 0x53f80008, .val = 0x20034000, },
|
||||
};
|
||||
|
||||
#define APP_DEST 0x80000000
|
||||
|
||||
struct imx_flash_header __flash_header_0x400 eukrea_cpuimx25_header = {
|
||||
.app_code_jump_vector = TEXT_BASE + 0x2000,
|
||||
.app_code_barker = APP_CODE_BARKER,
|
||||
.app_code_csf = 0,
|
||||
.dcd_ptr_ptr = TEXT_BASE + 0x400 + offsetof(struct imx_flash_header, dcd),
|
||||
.super_root_key = 0,
|
||||
.dcd = TEXT_BASE + 0x400 + offsetof(struct imx_flash_header, dcd_barker),
|
||||
.app_dest = TEXT_BASE,
|
||||
.dcd_barker = DCD_BARKER,
|
||||
.dcd_block_len = sizeof(dcd_entry),
|
||||
};
|
||||
|
||||
extern unsigned long __bss_start;
|
||||
|
||||
unsigned long __image_len_0x400 barebox_len = 0x40000;
|
||||
|
||||
static struct fec_platform_data fec_info = {
|
||||
.xcv_type = RMII,
|
||||
.phy_addr = 1,
|
||||
};
|
||||
|
||||
static struct device_d fec_dev = {
|
||||
.name = "fec_imx",
|
||||
.map_base = IMX_FEC_BASE,
|
||||
.platform_data = &fec_info,
|
||||
};
|
||||
|
||||
static struct memory_platform_data sdram_pdata = {
|
||||
.name = "ram0",
|
||||
.flags = DEVFS_RDWR,
|
||||
};
|
||||
|
||||
static struct device_d sdram0_dev = {
|
||||
.name = "mem",
|
||||
.map_base = IMX_SDRAM_CS0,
|
||||
.size = 64 * 1024 * 1024,
|
||||
.platform_data = &sdram_pdata,
|
||||
};
|
||||
|
||||
struct imx_nand_platform_data nand_info = {
|
||||
.width = 1,
|
||||
.hw_ecc = 1,
|
||||
};
|
||||
|
||||
static struct device_d nand_dev = {
|
||||
.name = "imx_nand",
|
||||
.map_base = IMX_NFC_BASE,
|
||||
.platform_data = &nand_info,
|
||||
};
|
||||
|
||||
static struct imx_fb_videomode imxfb_mode = {
|
||||
.mode = {
|
||||
.name = "CMO-QVGA",
|
||||
.refresh = 60,
|
||||
.xres = 320,
|
||||
.yres = 240,
|
||||
.pixclock = KHZ2PICOS(6500),
|
||||
.hsync_len = 30,
|
||||
.left_margin = 38,
|
||||
.right_margin = 20,
|
||||
.vsync_len = 3,
|
||||
.upper_margin = 15,
|
||||
.lower_margin = 4,
|
||||
},
|
||||
.pcr = 0xCAD08B80,
|
||||
.bpp = 16,
|
||||
};
|
||||
|
||||
static struct imx_fb_platform_data eukrea_cpuimx25_fb_data = {
|
||||
.mode = &imxfb_mode,
|
||||
.pwmr = 0x00A903FF,
|
||||
.lscr1 = 0x00120300,
|
||||
.dmacr = 0x80040060,
|
||||
};
|
||||
|
||||
|
||||
static struct device_d imxfb_dev = {
|
||||
.name = "imxfb",
|
||||
.map_base = 0x53fbc000,
|
||||
.size = 0x1000,
|
||||
.platform_data = &eukrea_cpuimx25_fb_data,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
static void eukrea_cpuimx25_mmu_init(void)
|
||||
{
|
||||
mmu_init();
|
||||
|
||||
arm_create_section(0x80000000, 0x80000000, 128, PMD_SECT_DEF_CACHED);
|
||||
arm_create_section(0x90000000, 0x80000000, 128, PMD_SECT_DEF_UNCACHED);
|
||||
|
||||
setup_dma_coherent(0x10000000);
|
||||
|
||||
mmu_enable();
|
||||
}
|
||||
#else
|
||||
static void eukrea_cpuimx25_mmu_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct pad_desc eukrea_cpuimx25_pads[] = {
|
||||
MX25_PAD_FEC_MDC__MDC,
|
||||
MX25_PAD_FEC_MDIO__MDIO,
|
||||
MX25_PAD_FEC_RDATA0__RDATA0,
|
||||
MX25_PAD_FEC_RDATA1__RDATA1,
|
||||
MX25_PAD_FEC_RX_DV__RX_DV,
|
||||
MX25_PAD_FEC_TDATA0__TDATA0,
|
||||
MX25_PAD_FEC_TDATA1__TDATA1,
|
||||
MX25_PAD_FEC_TX_CLK__TX_CLK,
|
||||
MX25_PAD_FEC_TX_EN__TX_EN,
|
||||
/* UART1 */
|
||||
MX25_PAD_UART1_RXD__RXD_MUX,
|
||||
MX25_PAD_UART1_TXD__TXD_MUX,
|
||||
MX25_PAD_UART1_RTS__RTS,
|
||||
MX25_PAD_UART1_CTS__CTS,
|
||||
/* LCDC */
|
||||
MX25_PAD_LD0__LCDC_LD0,
|
||||
MX25_PAD_LD1__LCDC_LD1,
|
||||
MX25_PAD_LD2__LCDC_LD2,
|
||||
MX25_PAD_LD3__LCDC_LD3,
|
||||
MX25_PAD_LD4__LCDC_LD4,
|
||||
MX25_PAD_LD5__LCDC_LD5,
|
||||
MX25_PAD_LD6__LCDC_LD6,
|
||||
MX25_PAD_LD7__LCDC_LD7,
|
||||
MX25_PAD_LD8__LCDC_LD8,
|
||||
MX25_PAD_LD9__LCDC_LD9,
|
||||
MX25_PAD_LD10__LCDC_LD10,
|
||||
MX25_PAD_LD11__LCDC_LD11,
|
||||
MX25_PAD_LD12__LCDC_LD12,
|
||||
MX25_PAD_LD13__LCDC_LD13,
|
||||
MX25_PAD_LD14__LCDC_LD14,
|
||||
MX25_PAD_LD15__LCDC_LD15,
|
||||
MX25_PAD_GPIO_E__LCDC_LD16,
|
||||
MX25_PAD_GPIO_F__LCDC_LD17,
|
||||
MX25_PAD_LSCLK__LCDC_LSCLK,
|
||||
MX25_PAD_OE_ACD__LCDC_OE_ACD,
|
||||
MX25_PAD_VSYNC__LCDC_VSYN,
|
||||
MX25_PAD_HSYNC__LCDC_HSYN,
|
||||
/* BACKLIGHT CONTROL */
|
||||
MX25_PAD_PWM__GPIO26,
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx25_devices_init(void)
|
||||
{
|
||||
eukrea_cpuimx25_mmu_init();
|
||||
|
||||
mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads,
|
||||
ARRAY_SIZE(eukrea_cpuimx25_pads));
|
||||
register_device(&fec_dev);
|
||||
|
||||
nand_info.width = 1;
|
||||
register_device(&nand_dev);
|
||||
|
||||
devfs_add_partition("nand0", 0x00000, 0x40000,
|
||||
PARTITION_FIXED, "self_raw");
|
||||
dev_add_bb_dev("self_raw", "self0");
|
||||
|
||||
devfs_add_partition("nand0", 0x40000, 0x40000,
|
||||
PARTITION_FIXED, "env_raw");
|
||||
dev_add_bb_dev("env_raw", "env0");
|
||||
|
||||
register_device(&sdram0_dev);
|
||||
|
||||
/* enable LCD */
|
||||
gpio_direction_output(26, 1);
|
||||
gpio_set_value(26, 1);
|
||||
|
||||
register_device(&imxfb_dev);
|
||||
|
||||
armlinux_add_dram(&sdram0_dev);
|
||||
armlinux_set_bootparams((void *)0x80000100);
|
||||
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
device_initcall(eukrea_cpuimx25_devices_init);
|
||||
|
||||
static struct device_d eukrea_cpuimx25_serial_device = {
|
||||
.name = "imx_serial",
|
||||
.map_base = IMX_UART1_BASE,
|
||||
.size = 16 * 1024,
|
||||
};
|
||||
|
||||
static int eukrea_cpuimx25_console_init(void)
|
||||
{
|
||||
writel(0x03010101, IMX_CCM_BASE + CCM_PCDR3);
|
||||
register_device(&eukrea_cpuimx25_serial_device);
|
||||
return 0;
|
||||
}
|
||||
|
||||
console_initcall(eukrea_cpuimx25_console_init);
|
||||
|
||||
#ifdef CONFIG_NAND_IMX_BOOT
|
||||
void __bare_init nand_boot(void)
|
||||
{
|
||||
imx_nand_load_image((void *)TEXT_BASE, 256 * 1024);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int eukrea_cpuimx25_core_setup(void)
|
||||
{
|
||||
writel(0x01010103, IMX_CCM_BASE + CCM_PCDR2);
|
||||
return 0;
|
||||
|
||||
}
|
||||
core_initcall(eukrea_cpuimx25_core_setup);
|
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
*
|
||||
* (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
|
||||
* (c) 2010 Eukrea Electromatique, Eric Bénard <eric@eukrea.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <mach/imx-regs.h>
|
||||
#include <mach/imx-pll.h>
|
||||
#include <mach/esdctl.h>
|
||||
#include <asm/cache-l2x0.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/imx-nand.h>
|
||||
#include <asm/barebox-arm.h>
|
||||
#include <asm-generic/memory_layout.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
static void __bare_init __naked insdram(void)
|
||||
{
|
||||
uint32_t r;
|
||||
|
||||
/* setup a stack to be able to call imx_nand_load_image() */
|
||||
r = STACK_BASE + STACK_SIZE - 12;
|
||||
__asm__ __volatile__("mov sp, %0" : : "r"(r));
|
||||
|
||||
imx_nand_load_image((void *)TEXT_BASE, 256 * 1024);
|
||||
|
||||
board_init_lowlevel_return();
|
||||
}
|
||||
|
||||
#define MX25_CCM_MCR 0x64
|
||||
#define MX25_CCM_CGR0 0x0c
|
||||
#define MX25_CCM_CGR1 0x10
|
||||
#define MX25_CCM_CGR2 0x14
|
||||
|
||||
void __bare_init __naked board_init_lowlevel(void)
|
||||
{
|
||||
uint32_t r;
|
||||
unsigned int *trg, *src;
|
||||
int i;
|
||||
|
||||
/* AIPS setup - Only setup MPROTx registers. The PACR default values are good.
|
||||
* Set all MPROTx to be non-bufferable, trusted for R/W,
|
||||
* not forced to user-mode.
|
||||
*/
|
||||
writel(0x77777777, 0x43f00000);
|
||||
writel(0x77777777, 0x43f00004);
|
||||
writel(0x77777777, 0x53f00000);
|
||||
writel(0x77777777, 0x53f00004);
|
||||
|
||||
/* MAX (Multi-Layer AHB Crossbar Switch) setup
|
||||
* MPR - priority for MX25 is (SDHC2/SDMA)>USBOTG>RTIC>IAHB>DAHB
|
||||
*/
|
||||
writel(0x00002143, 0x43f04000);
|
||||
writel(0x00002143, 0x43f04100);
|
||||
writel(0x00002143, 0x43f04200);
|
||||
writel(0x00002143, 0x43f04300);
|
||||
writel(0x00002143, 0x43f04400);
|
||||
/* SGPCR - always park on last master */
|
||||
writel(0x10, 0x43f04010);
|
||||
writel(0x10, 0x43f04110);
|
||||
writel(0x10, 0x43f04210);
|
||||
writel(0x10, 0x43f04310);
|
||||
writel(0x10, 0x43f04410);
|
||||
/* MGPCR - restore default values */
|
||||
writel(0x0, 0x43f04800);
|
||||
writel(0x0, 0x43f04900);
|
||||
writel(0x0, 0x43f04a00);
|
||||
writel(0x0, 0x43f04b00);
|
||||
writel(0x0, 0x43f04c00);
|
||||
|
||||
/* Configure M3IF registers
|
||||
* M3IF Control Register (M3IFCTL) for MX25
|
||||
* MRRP[0] = LCDC on priority list (1 << 0) = 0x00000001
|
||||
* MRRP[1] = MAX1 not on priority list (0 << 1) = 0x00000000
|
||||
* MRRP[2] = MAX0 not on priority list (0 << 2) = 0x00000000
|
||||
* MRRP[3] = USB HOST not on priority list (0 << 3) = 0x00000000
|
||||
* MRRP[4] = SDMA not on priority list (0 << 4) = 0x00000000
|
||||
* MRRP[5] = SD/ATA/FEC not on priority list (0 << 5) = 0x00000000
|
||||
* MRRP[6] = SCMFBC not on priority list (0 << 6) = 0x00000000
|
||||
* MRRP[7] = CSI not on priority list (0 << 7) = 0x00000000
|
||||
* ----------
|
||||
* 0x00000001
|
||||
*/
|
||||
writel(0x1, 0xb8003000);
|
||||
|
||||
/* enable all the clocks */
|
||||
writel(0x038A81A2, IMX_CCM_BASE + MX25_CCM_CGR0);
|
||||
writel(0x24788F00, IMX_CCM_BASE + MX25_CCM_CGR1);
|
||||
writel(0x00004438, IMX_CCM_BASE + MX25_CCM_CGR2);
|
||||
writel(0x00, IMX_CCM_BASE + MX25_CCM_MCR);
|
||||
|
||||
#ifdef CONFIG_NAND_IMX_BOOT
|
||||
/* skip NAND boot if not running from NFC space */
|
||||
r = get_pc();
|
||||
if (r < IMX_NFC_BASE || r > IMX_NFC_BASE + 0x1000)
|
||||
board_init_lowlevel_return();
|
||||
|
||||
src = (unsigned int *)IMX_NFC_BASE;
|
||||
trg = (unsigned int *)TEXT_BASE;
|
||||
|
||||
/* Move ourselves out of NFC SRAM */
|
||||
for (i = 0; i < 0x1000 / sizeof(int); i++)
|
||||
*trg++ = *src++;
|
||||
|
||||
/* Jump to SDRAM */
|
||||
r = (unsigned int)&insdram;
|
||||
__asm__ __volatile__("mov pc, %0" : : "r"(r));
|
||||
#else
|
||||
board_init_lowlevel_return();
|
||||
#endif
|
||||
}
|
|
@ -17,10 +17,14 @@ if [ x$1 = xnor ]; then
|
|||
kernel=nor
|
||||
fi
|
||||
|
||||
if [ x$ip = xdhcp ]; then
|
||||
bootargs="$bootargs ip=dhcp"
|
||||
if [ x$root = xnet ]; then
|
||||
if [ x$ip = xdhcp ]; then
|
||||
bootargs="$bootargs ip=dhcp"
|
||||
else
|
||||
bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
|
||||
fi
|
||||
else
|
||||
bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
|
||||
bootargs="$bootargs ip=off"
|
||||
fi
|
||||
|
||||
if [ x$root = xnand ]; then
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
kernel=nor
|
||||
root=nor
|
||||
|
||||
uimage=cpuimx27/uImage
|
||||
jffs2=cpuimx27/rootfs.jffs2
|
||||
uimage=mx27/uImage
|
||||
jffs2=mx27/rootfs.jffs2
|
||||
|
||||
autoboot_timeout=3
|
||||
autoboot_timeout=1
|
||||
|
||||
# TFP410-SVGA TFP410-VGA CMO-QVGA Optrex-WVGA Sharp-QVGA-EK
|
||||
# DVI-SVGA DVI-VGA CMO-QVGA
|
||||
video="CMO-QVGA"
|
||||
bootargs="console=ttymxc0,115200 fec_mac=$eth0.ethaddr rtc-pcf8563.probe=0,0x51 video=mxcfb:$video"
|
||||
bootargs="console=ttymxc0,115200 fec_mac=$eth0.ethaddr video=mxcfb:$video"
|
||||
|
||||
nor_parts="256k(barebox)ro,128k(bareboxenv),1792k(kernel),-(root)"
|
||||
nor_parts="256k(barebox)ro,128k(bareboxenv),2176k(kernel),-(root)"
|
||||
rootpart_nor="/dev/mtdblock3"
|
||||
|
||||
nand_parts="-(nand)"
|
||||
|
@ -28,4 +28,4 @@ ip=dhcp
|
|||
#eth0.ipaddr=a.b.c.d
|
||||
#eth0.netmask=a.b.c.d
|
||||
#eth0.gateway=a.b.c.d
|
||||
eth0.serverip=192.168.1.15
|
||||
#eth0.serverip=a.b.c.d
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <asm/io.h>
|
||||
#include <mach/imx-nand.h>
|
||||
#include <mach/imx-pll.h>
|
||||
#include <mach/imxfb.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <i2c/i2c.h>
|
||||
|
@ -176,6 +177,39 @@ static void eukrea_cpuimx27_mmu_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DRIVER_VIDEO_IMX
|
||||
static struct imx_fb_videomode imxfb_mode = {
|
||||
.mode = {
|
||||
.name = "CMO-QVGA",
|
||||
.refresh = 60,
|
||||
.xres = 320,
|
||||
.yres = 240,
|
||||
.pixclock = 156000,
|
||||
.hsync_len = 30,
|
||||
.left_margin = 38,
|
||||
.right_margin = 20,
|
||||
.vsync_len = 3,
|
||||
.upper_margin = 15,
|
||||
.lower_margin = 4,
|
||||
},
|
||||
.pcr = 0xFAD08B80,
|
||||
.bpp = 16,};
|
||||
|
||||
static struct imx_fb_platform_data eukrea_cpuimx27_fb_data = {
|
||||
.mode = &imxfb_mode,
|
||||
.pwmr = 0x00A903FF,
|
||||
.lscr1 = 0x00120300,
|
||||
.dmacr = 0x00020010,
|
||||
};
|
||||
|
||||
static struct device_d imxfb_dev = {
|
||||
.name = "imxfb",
|
||||
.map_base = 0x10021000,
|
||||
.size = 0x1000,
|
||||
.platform_data = &eukrea_cpuimx27_fb_data,
|
||||
};
|
||||
#endif
|
||||
|
||||
static int eukrea_cpuimx27_devices_init(void)
|
||||
{
|
||||
char *envdev = "no";
|
||||
|
@ -207,6 +241,31 @@ static int eukrea_cpuimx27_devices_init(void)
|
|||
PE13_PF_UART1_RXD,
|
||||
PE14_PF_UART1_CTS,
|
||||
PE15_PF_UART1_RTS,
|
||||
#endif
|
||||
#ifdef CONFIG_DRIVER_VIDEO_IMX
|
||||
PA5_PF_LSCLK,
|
||||
PA6_PF_LD0,
|
||||
PA7_PF_LD1,
|
||||
PA8_PF_LD2,
|
||||
PA9_PF_LD3,
|
||||
PA10_PF_LD4,
|
||||
PA11_PF_LD5,
|
||||
PA12_PF_LD6,
|
||||
PA13_PF_LD7,
|
||||
PA14_PF_LD8,
|
||||
PA15_PF_LD9,
|
||||
PA16_PF_LD10,
|
||||
PA17_PF_LD11,
|
||||
PA18_PF_LD12,
|
||||
PA19_PF_LD13,
|
||||
PA20_PF_LD14,
|
||||
PA21_PF_LD15,
|
||||
PA22_PF_LD16,
|
||||
PA23_PF_LD17,
|
||||
PA28_PF_HSYNC,
|
||||
PA29_PF_VSYNC,
|
||||
PA31_PF_OE_ACD,
|
||||
GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -217,7 +276,7 @@ static int eukrea_cpuimx27_devices_init(void)
|
|||
CS0L = 0xA0330D01;
|
||||
CS0A = 0x002208C0;
|
||||
|
||||
/* initizalize gpios */
|
||||
/* initialize gpios */
|
||||
for (i = 0; i < ARRAY_SIZE(mode); i++)
|
||||
imx_gpio_mode(mode[i]);
|
||||
|
||||
|
@ -239,6 +298,12 @@ static int eukrea_cpuimx27_devices_init(void)
|
|||
|
||||
printf("Using environment in %s Flash\n", envdev);
|
||||
|
||||
#ifdef CONFIG_DRIVER_VIDEO_IMX
|
||||
register_device(&imxfb_dev);
|
||||
gpio_direction_output(GPIO_PORTE | 5, 0);
|
||||
gpio_set_value(GPIO_PORTE | 5, 1);
|
||||
#endif
|
||||
|
||||
armlinux_add_dram(&sdram_dev);
|
||||
armlinux_set_bootparams((void *)0xa0000100);
|
||||
armlinux_set_architecture(MACH_TYPE_CPUIMX27);
|
||||
|
|
|
@ -47,11 +47,17 @@
|
|||
#include <mach/iomux-v3.h>
|
||||
#include <mach/pmic.h>
|
||||
#include <mach/imx-ipu-fb.h>
|
||||
#include <mach/generic.h>
|
||||
|
||||
#include <i2c/i2c.h>
|
||||
#include <i2c/mc13892.h>
|
||||
#include <i2c/mc9sdz60.h>
|
||||
|
||||
|
||||
/* Board rev for the PDK 3stack */
|
||||
#define MX35PDK_BOARD_REV_1 0
|
||||
#define MX35PDK_BOARD_REV_2 1
|
||||
|
||||
static struct device_d cfi_dev = {
|
||||
.name = "cfi_flash",
|
||||
.map_base = IMX_CS0_BASE,
|
||||
|
@ -144,6 +150,32 @@ static struct device_d imxfb_dev = {
|
|||
.platform_data = &ipu_fb_data,
|
||||
};
|
||||
|
||||
/*
|
||||
* Revision to be passed to kernel. The kernel provided
|
||||
* by freescale relies on this.
|
||||
*
|
||||
* C --> CPU type
|
||||
* S --> Silicon revision
|
||||
* B --> Board rev
|
||||
*
|
||||
* 31 20 16 12 8 4 0
|
||||
* | Cmaj | Cmin | B | Smaj | Smin|
|
||||
*
|
||||
* e.g 0x00035120 --> i.MX35, Cpu silicon rev 2.0, Board rev 2
|
||||
*/
|
||||
static unsigned int imx35_3ds_system_rev = 0x00035000;
|
||||
|
||||
static void set_silicon_rev( int rev)
|
||||
{
|
||||
imx35_3ds_system_rev = imx35_3ds_system_rev | (rev & 0xFF);
|
||||
}
|
||||
|
||||
static void set_board_rev(int rev)
|
||||
{
|
||||
imx35_3ds_system_rev = (imx35_3ds_system_rev & ~(0xF << 8)) | (rev & 0xF) << 8;
|
||||
}
|
||||
|
||||
|
||||
static int f3s_devices_init(void)
|
||||
{
|
||||
uint32_t reg;
|
||||
|
@ -181,6 +213,8 @@ static int f3s_devices_init(void)
|
|||
break;
|
||||
}
|
||||
|
||||
set_silicon_rev(imx_silicon_revision());
|
||||
|
||||
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
|
||||
register_device(&i2c_dev);
|
||||
|
||||
|
@ -201,10 +235,8 @@ device_initcall(f3s_devices_init);
|
|||
|
||||
static int f3s_enable_display(void)
|
||||
{
|
||||
gpio_direction_output(1, 1);
|
||||
|
||||
/* Enable power to the LCD. (bit 6 hi.) */
|
||||
mc9sdz60_set_bits( mc9sdz60_get(), MC9SDZ60_REG_GPIO_1, 0x40, 0x40);
|
||||
mc9sdz60_set_bits(mc9sdz60_get(), MC9SDZ60_REG_GPIO_1, 0x40, 0x40);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -248,6 +280,8 @@ static struct pad_desc f3s_pads[] = {
|
|||
MX35_PAD_I2C1_DAT__I2C1_SDA,
|
||||
|
||||
MX35_PAD_WDOG_RST__GPIO1_6,
|
||||
MX35_PAD_COMPARE__GPIO1_5,
|
||||
|
||||
/* Display */
|
||||
MX35_PAD_LD0__IPU_DISPB_DAT_0,
|
||||
MX35_PAD_LD1__IPU_DISPB_DAT_1,
|
||||
|
@ -270,7 +304,7 @@ static struct pad_desc f3s_pads[] = {
|
|||
MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC,
|
||||
MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK,
|
||||
MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY,
|
||||
MX35_PAD_CONTRAST__GPIO1_1,
|
||||
MX35_PAD_CONTRAST__IPU_DISPB_CONTR,
|
||||
MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC,
|
||||
MX35_PAD_D3_REV__IPU_DISPB_D3_REV,
|
||||
MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS,
|
||||
|
@ -374,13 +408,16 @@ static int f3s_get_rev(struct mc13892 *mc13892)
|
|||
if (rev == 0x00ffffff)
|
||||
return -ENODEV;
|
||||
|
||||
return ((rev >> 6) & 0x7) ? 20 : 10;
|
||||
return ((rev >> 6) & 0x7) ? MX35PDK_BOARD_REV_2 : MX35PDK_BOARD_REV_1;
|
||||
}
|
||||
|
||||
static int f3s_pmic_init_v2(struct mc13892 *mc13892)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* COMPARE pin (GPIO1_5) as output and set high */
|
||||
gpio_direction_output( 32*0 + 5 , 1);
|
||||
|
||||
err |= mc13892_set_bits(mc13892, MC13892_REG_SETTING_0, 0x03, 0x03);
|
||||
err |= mc13892_set_bits(mc13892, MC13892_REG_MODE_0, 0x01, 0x01);
|
||||
if (err)
|
||||
|
@ -421,16 +458,18 @@ static int f3s_pmic_init(void)
|
|||
|
||||
rev = f3s_get_rev(mc13892);
|
||||
switch (rev) {
|
||||
case 10:
|
||||
case MX35PDK_BOARD_REV_1:
|
||||
break;
|
||||
case 20:
|
||||
case MX35PDK_BOARD_REV_2:
|
||||
f3s_pmic_init_v2(mc13892);
|
||||
break;
|
||||
default:
|
||||
printf("FAILED to identify board revision!\n");
|
||||
return 0;
|
||||
}
|
||||
printf("i.MX35 PDK CPU board version %d.%d\n", rev / 10, rev % 10);
|
||||
|
||||
set_board_rev(rev);
|
||||
printf("i.MX35 PDK CPU board version %d.\n", rev );
|
||||
|
||||
mc9sdz60 = mc9sdz60_get();
|
||||
if (!mc9sdz60) {
|
||||
|
@ -440,6 +479,8 @@ static int f3s_pmic_init(void)
|
|||
|
||||
f3s_pmic_init_all(mc9sdz60);
|
||||
|
||||
armlinux_set_revision(imx35_3ds_system_rev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -314,4 +314,12 @@ config CMD_UNLZO
|
|||
Say yes here to get the unlzo command. lzo is a fast compression
|
||||
algorithm by Markus Franz Xaver Johannes Oberhumer.
|
||||
|
||||
config CMD_I2C
|
||||
bool
|
||||
depends on I2C
|
||||
prompt "i2c commands"
|
||||
help
|
||||
include i2c_probe, i2c_read and i2c_write commands to communicate
|
||||
on i2c bus.
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -48,3 +48,4 @@ obj-$(CONFIG_CMD_BMP) += bmp.o
|
|||
obj-$(CONFIG_USB_GADGET_DFU) += dfu.o
|
||||
obj-$(CONFIG_CMD_GPIO) += gpio.o
|
||||
obj-$(CONFIG_CMD_UNLZO) += unlzo.o
|
||||
obj-$(CONFIG_CMD_I2C) += i2c.o
|
||||
|
|
|
@ -0,0 +1,214 @@
|
|||
/*
|
||||
* i2c.c - i2c commands
|
||||
*
|
||||
* Copyright (c) 2010 Eric Bénard <eric@eukrea.Com>, Eukréa Electromatique
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <errno.h>
|
||||
#include <malloc.h>
|
||||
#include <getopt.h>
|
||||
#include <i2c/i2c.h>
|
||||
|
||||
static int do_i2c_probe(struct command *cmdtp, int argc, char *argv[])
|
||||
{
|
||||
struct i2c_adapter *adapter;
|
||||
struct i2c_client client;
|
||||
int startaddr = -1, stopaddr = -1, addr, ret;
|
||||
u8 reg;
|
||||
|
||||
if (argc < 4)
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
adapter = i2c_get_adapter(simple_strtoul(argv[1], NULL, 0));
|
||||
if (!adapter)
|
||||
return -ENODEV;
|
||||
client.adapter = adapter;
|
||||
|
||||
startaddr = simple_strtol(argv[2], NULL, 0);
|
||||
stopaddr = simple_strtol(argv[3], NULL, 0);
|
||||
if ((startaddr == -1) || (stopaddr == -1) || (startaddr > stopaddr))
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
if (stopaddr > 0x7F)
|
||||
stopaddr = 0x7F;
|
||||
|
||||
printf("probing i2c range 0X%02x - 0x%02x :\n", startaddr, stopaddr);
|
||||
for (addr = startaddr; addr <= stopaddr; addr++) {
|
||||
client.addr = addr;
|
||||
ret = i2c_write_reg(&client, 0x00, ®, 0);
|
||||
if (ret == 0)
|
||||
printf("0x%02x ", addr);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const __maybe_unused char cmd_i2c_probe_help[] =
|
||||
"Usage: i2c_probe bus 0xstartaddr 0xstopaddr\n"
|
||||
"probe a range of i2c addresses.\n";
|
||||
|
||||
BAREBOX_CMD_START(i2c_probe)
|
||||
.cmd = do_i2c_probe,
|
||||
.usage = "probe for an i2c device",
|
||||
BAREBOX_CMD_HELP(cmd_i2c_probe_help)
|
||||
BAREBOX_CMD_END
|
||||
|
||||
static int do_i2c_write(struct command *cmdtp, int argc, char *argv[])
|
||||
{
|
||||
struct i2c_adapter *adapter = NULL;
|
||||
struct i2c_client client;
|
||||
int addr = -1, reg = -1, count = -1, verbose = 0, ret, opt, i, bus = 0;
|
||||
u8 *buf;
|
||||
|
||||
while ((opt = getopt(argc, argv, "a:b:r:v")) > 0) {
|
||||
switch (opt) {
|
||||
case 'a':
|
||||
addr = simple_strtol(optarg, NULL, 0);
|
||||
break;
|
||||
case 'r':
|
||||
reg = simple_strtol(optarg, NULL, 0);
|
||||
break;
|
||||
case 'b':
|
||||
bus = simple_strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
count = argc - optind;
|
||||
|
||||
if ((addr < 0) || (reg < 0) || (count == 0) || (addr > 0x7F))
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
adapter = i2c_get_adapter(bus);
|
||||
if (!adapter) {
|
||||
printf("i2c bus %d not found\n", bus);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
client.adapter = adapter;
|
||||
client.addr = addr;
|
||||
|
||||
buf = xmalloc(count);
|
||||
for (i = 0; i < count; i++)
|
||||
*(buf + i) = (char) simple_strtol(argv[optind+i], NULL, 16);
|
||||
|
||||
ret = i2c_write_reg(&client, reg, buf, count);
|
||||
if (ret != count)
|
||||
goto out;
|
||||
ret = 0;
|
||||
|
||||
if (verbose) {
|
||||
printf("wrote %i bytes starting at reg 0x%02x to i2cdev 0x%02x on bus %i\n",
|
||||
count, reg, addr, adapter->nr);
|
||||
for (i = 0; i < count; i++)
|
||||
printf("0x%02x ", *(buf + i));
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
out:
|
||||
free(buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const __maybe_unused char cmd_i2c_write_help[] =
|
||||
"Usage: i2c_write [OPTION] ... hexdatas\n"
|
||||
"write to i2c device.\n"
|
||||
" -a 0x<addr> i2c device address\n"
|
||||
" -b <bus_num> i2c bus number (default = 0)\n"
|
||||
" -r 0x<reg> start register\n";
|
||||
|
||||
BAREBOX_CMD_START(i2c_write)
|
||||
.cmd = do_i2c_write,
|
||||
.usage = "write to an i2c device",
|
||||
BAREBOX_CMD_HELP(cmd_i2c_write_help)
|
||||
BAREBOX_CMD_END
|
||||
|
||||
static int do_i2c_read(struct command *cmdtp, int argc, char *argv[])
|
||||
{
|
||||
struct i2c_adapter *adapter = NULL;
|
||||
struct i2c_client client;
|
||||
u8 *buf;
|
||||
int count = -1, addr = -1, reg = -1, verbose = 0, ret, opt, bus = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "a:b:c:r:v")) > 0) {
|
||||
switch (opt) {
|
||||
case 'a':
|
||||
addr = simple_strtol(optarg, NULL, 0);
|
||||
break;
|
||||
case 'c':
|
||||
count = simple_strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case 'b':
|
||||
bus = simple_strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case 'r':
|
||||
reg = simple_strtol(optarg, NULL, 0);
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((addr < 0) || (reg < 0) || (count == 0) || (addr > 0x7F))
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
adapter = i2c_get_adapter(bus);
|
||||
if (!adapter) {
|
||||
printf("i2c bus %d not found\n", bus);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
client.adapter = adapter;
|
||||
client.addr = addr;
|
||||
|
||||
buf = xmalloc(count);
|
||||
ret = i2c_read_reg(&client, reg, buf, count);
|
||||
if (ret == count) {
|
||||
int i;
|
||||
if (verbose)
|
||||
printf("read %i bytes starting at reg 0x%02x from i2cdev 0x%02x on bus %i\n",
|
||||
count, reg, addr, adapter->nr);
|
||||
for (i = 0; i < count; i++)
|
||||
printf("0x%02x ", *(buf + i));
|
||||
printf("\n");
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
free(buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const __maybe_unused char cmd_i2c_read_help[] =
|
||||
"Usage: i2c_read [OPTION]\n"
|
||||
"read i2c device.\n"
|
||||
" -a 0x<addr> i2c device address\n"
|
||||
" -b <bus_num> i2c bus number (default = 0)\n"
|
||||
" -r 0x<reg> start register\n"
|
||||
" -c <count> byte count\n";
|
||||
|
||||
BAREBOX_CMD_START(i2c_read)
|
||||
.cmd = do_i2c_read,
|
||||
.usage = "read from an i2c device",
|
||||
BAREBOX_CMD_HELP(cmd_i2c_read_help)
|
||||
BAREBOX_CMD_END
|
|
@ -214,7 +214,7 @@ static int i2c_imx_acked(struct i2c_adapter *adapter)
|
|||
break;
|
||||
|
||||
if (is_timeout(start, MSECOND)) {
|
||||
dev_err(adapter->dev, "<%s> No ACK\n", __func__);
|
||||
dev_dbg(adapter->dev, "<%s> No ACK\n", __func__);
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ struct boardinfo {
|
|||
};
|
||||
|
||||
static LIST_HEAD(board_list);
|
||||
|
||||
static LIST_HEAD(adapter_list);
|
||||
|
||||
/**
|
||||
* i2c_transfer - execute a single or combined I2C message
|
||||
|
@ -326,6 +326,23 @@ static void scan_boardinfo(struct i2c_adapter *adapter)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* i2c_get_adapter - get an i2c adapter from its busnum
|
||||
*
|
||||
* @param busnum the desired bus number
|
||||
*
|
||||
*/
|
||||
struct i2c_adapter *i2c_get_adapter(int busnum)
|
||||
{
|
||||
struct i2c_adapter *adap;
|
||||
|
||||
list_for_each_entry(adap, &adapter_list, list)
|
||||
if (adap->nr == busnum)
|
||||
return adap;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* i2c_register_master - register I2C master controller
|
||||
*
|
||||
|
@ -345,6 +362,11 @@ static void scan_boardinfo(struct i2c_adapter *adapter)
|
|||
*/
|
||||
int i2c_add_numbered_adapter(struct i2c_adapter *adapter)
|
||||
{
|
||||
if (i2c_get_adapter(adapter->nr))
|
||||
return -EBUSY;
|
||||
|
||||
list_add_tail(&adapter_list, &adapter->list);
|
||||
|
||||
/* populate children from any i2c device tables */
|
||||
scan_boardinfo(adapter);
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@ if VIDEO
|
|||
|
||||
config DRIVER_VIDEO_IMX
|
||||
bool "i.MX framebuffer driver"
|
||||
depends on ARCH_IMX1 || ARCH_IMX21 || ARCH_IMX27
|
||||
depends on ARCH_IMX1 || ARCH_IMX21 || ARCH_IMX25 || ARCH_IMX27
|
||||
|
||||
config IMXFB_DRIVER_VIDEO_IMX_OVERLAY
|
||||
bool "i.MX framebuffer overlay support"
|
||||
depends on DRIVER_VIDEO_IMX && (ARCH_IMX27 || ARCH_IMX21)
|
||||
depends on DRIVER_VIDEO_IMX && (ARCH_IMX27 || ARCH_IMX25 || ARCH_IMX21)
|
||||
|
||||
config DRIVER_VIDEO_IMX_IPU
|
||||
bool "i.MX31/35 framebuffer driver"
|
||||
|
|
|
@ -258,7 +258,12 @@ static void imxfb_enable_controller(struct fb_info *info)
|
|||
PCCR0 |= PCCR0_LCDC_EN;
|
||||
PCCR1 |= PCCR1_HCLK_LCDC;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_IMX25
|
||||
writel(readl(IMX_CCM_BASE + CCM_CGCR0) | (1 << 24) | (1 << 7),
|
||||
IMX_CCM_BASE + CCM_CGCR0);
|
||||
writel(readl(IMX_CCM_BASE + CCM_CGCR1) | (1 << 29),
|
||||
IMX_CCM_BASE + CCM_CGCR1);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void imxfb_disable_controller(struct fb_info *info)
|
||||
|
@ -273,6 +278,12 @@ static void imxfb_disable_controller(struct fb_info *info)
|
|||
PCCR0 &= ~PCCR0_LCDC_EN;
|
||||
PCCR1 &= ~PCCR1_HCLK_LCDC;
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_IMX25
|
||||
writel(readl(IMX_CCM_BASE + CCM_CGCR0) & ~((1 << 24) | (1 << 7)),
|
||||
IMX_CCM_BASE + CCM_CGCR0);
|
||||
writel(readl(IMX_CCM_BASE + CCM_CGCR1) & ~(1 << 29),
|
||||
IMX_CCM_BASE + CCM_CGCR1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -518,6 +529,12 @@ static int imxfb_probe(struct device_d *dev)
|
|||
PCCR0 &= ~PCCR0_LCDC_EN;
|
||||
PCCR1 &= ~PCCR1_HCLK_LCDC;
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_IMX25
|
||||
writel(readl(IMX_CCM_BASE + CCM_CGCR0) & ~((1 << 24) | (1 << 7)),
|
||||
IMX_CCM_BASE + CCM_CGCR0);
|
||||
writel(readl(IMX_CCM_BASE + CCM_CGCR1) & ~(1 << 29),
|
||||
IMX_CCM_BASE + CCM_CGCR1);
|
||||
#endif
|
||||
|
||||
fbi = xzalloc(sizeof(*fbi));
|
||||
info = &fbi->info;
|
||||
|
|
|
@ -66,6 +66,7 @@ struct i2c_adapter {
|
|||
struct device_d *dev; /* ptr to device */
|
||||
int nr; /* bus number */
|
||||
int (*master_xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
|
||||
|
@ -120,6 +121,7 @@ static inline int i2c_register_board_info(int busnum,
|
|||
}
|
||||
#endif
|
||||
extern int i2c_add_numbered_adapter(struct i2c_adapter *adapter);
|
||||
struct i2c_adapter *i2c_get_adapter(int busnum);
|
||||
|
||||
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
|
||||
extern int i2c_master_send(struct i2c_client *client, const char *buf, int count);
|
||||
|
|
Loading…
Reference in New Issue