nuvoton980 kernel support spi nand boot and rtc (四)

1      Scope of Document

This document describes kernel how to support spi nand boot

2      Requiremen

2.1     Function Requirement

2.2     Performance Requirement

NA

3      Method

3.1     Export cross compile

3.2     Support  kernel  spi nand

arch/arm/mach-nuc980/dev.c

};

static struct flash_platform_data nuc980_qspi0_flash_data = {

-#ifdef CONFIG_BOARD_IOT

+#ifdef CONFIG_BOARD_ETH2UART

       .name = "mt29f",

#else

       .name = "m25p80",

static struct spi_board_info nuc980_qspi0_board_info[] __initdata = {

#ifdef CONFIG_MTD_M25P80

       {

-#ifdef CONFIG_BOARD_IOT

+#ifdef CONFIG_BOARD_ETH2UART

              .modalias = "mt29f",

#else

              .modalias = "m25p80",

Kernel config change bootcmd:

-CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M"

+CONFIG_CMDLINE="noinitrd root=/dev/mtdblock2 rootfstype=yaffs2 rootflags=inband-tags console=ttyS0,115200n8 rdinit=/sbin/init mem=64M"

Kernel config can support:

#

# Network testing

#

# CONFIG_NET_PKTGEN is not set

# CONFIG_HAMRADIO is not set

CONFIG_CAN=y

CONFIG_CAN_RAW=y

CONFIG_CAN_BCM=y

CONFIG_CAN_GW=y

#

# CAN Device Drivers

#

# CONFIG_CAN_VCAN is not set

# CONFIG_CAN_SLCAN is not set

CONFIG_CAN_DEV=y

CONFIG_CAN_CALC_BITTIMING=y

# CONFIG_CAN_TI_HECC is not set

# CONFIG_CAN_FLEXCAN is not set

# CONFIG_CAN_RCAR is not set

# CONFIG_CAN_SJA1000 is not set

# CONFIG_CAN_C_CAN is not set

CONFIG_NUC980_CAN=y

# CONFIG_NUC980_CAN0 is not set

# CONFIG_NUC980_CAN1 is not set

CONFIG_NUC980_CAN2=y

# CONFIG_ENABLE_CAN2_RX_WAKEUP is not set

# CONFIG_NUC980_CAN2_PA is not set

# CONFIG_NUC980_CAN2_PB is not set

CONFIG_NUC980_CAN2_PB_PC=y

# CONFIG_NUC980_CAN2_PD is not set

# CONFIG_NUC980_CAN2_PE is not set

CONFIG_NUC980_CAN3=y

# CONFIG_ENABLE_CAN3_RX_WAKEUP is not set

CONFIG_NUC980_CAN3_PA=y

# CONFIG_NUC980_CAN3_PE_0 is not set

# CONFIG_NUC980_CAN3_PE_1 is not set

# CONFIG_CAN_M_CAN is not set

# CONFIG_CAN_CC770 is not set

Kernel configure RTC support::

CONFIG_RTC_LIB=y

CONFIG_RTC_CLASS=y

CONFIG_RTC_HCTOSYS=y

CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

CONFIG_RTC_SYSTOHC=y

CONFIG_RTC_SYSTOHC_DEVICE="rtc0"

# CONFIG_RTC_DEBUG is not set

#

# RTC interfaces

#

CONFIG_RTC_INTF_SYSFS=y

CONFIG_RTC_INTF_PROC=y

CONFIG_RTC_INTF_DEV=y

# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set

# CONFIG_RTC_DRV_TEST is not set

#

# SPI RTC drivers

#

# CONFIG_RTC_DRV_M41T93 is not set

# CONFIG_RTC_DRV_M41T94 is not set

# CONFIG_RTC_DRV_DS1305 is not set

# CONFIG_RTC_DRV_DS1343 is not set

# CONFIG_RTC_DRV_DS1347 is not set

# CONFIG_RTC_DRV_DS1390 is not set

# CONFIG_RTC_DRV_MAX6902 is not set

# CONFIG_RTC_DRV_R9701 is not set

# CONFIG_RTC_DRV_RS5C348 is not set

# CONFIG_RTC_DRV_DS3234 is not set

# CONFIG_RTC_DRV_PCF2123 is not set

# CONFIG_RTC_DRV_RX4581 is not set

# CONFIG_RTC_DRV_MCP795 is not set

#

# Platform RTC drivers

#

# CONFIG_RTC_DRV_CMOS is not set

# CONFIG_RTC_DRV_DS1286 is not set

# CONFIG_RTC_DRV_DS1511 is not set

# CONFIG_RTC_DRV_DS1553 is not set

# CONFIG_RTC_DRV_DS1685_FAMILY is not set

# CONFIG_RTC_DRV_DS1742 is not set

# CONFIG_RTC_DRV_DS2404 is not set

# CONFIG_RTC_DRV_STK17TA8 is not set

# CONFIG_RTC_DRV_M48T86 is not set

# CONFIG_RTC_DRV_M48T35 is not set

# CONFIG_RTC_DRV_M48T59 is not set

# CONFIG_RTC_DRV_MSM6242 is not set

# CONFIG_RTC_DRV_BQ4802 is not set

# CONFIG_RTC_DRV_RP5C01 is not set

# CONFIG_RTC_DRV_V3020 is not set

CONFIG_RTC_DRV_NUC980=y

CONFIG_ENABLE_RTC_WAKEUP=y

Kernel Configure Yaffs2 Support:

CONFIG_YAFFS_FS=y

CONFIG_YAFFS_YAFFS1=y

# CONFIG_YAFFS_9BYTE_TAGS is not set

# CONFIG_YAFFS_DOES_ECC is not set

CONFIG_YAFFS_YAFFS2=y

CONFIG_YAFFS_AUTO_YAFFS2=y

# CONFIG_YAFFS_DISABLE_TAGS_ECC is not set

# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set

# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set

# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set

# CONFIG_YAFFS_DISABLE_BACKGROUND is not set

# CONFIG_YAFFS_DISABLE_BAD_BLOCK_MARKING is not set

CONFIG_YAFFS_XATTR=y

make nuc980_eth2uart_defconfig

make uImage

4      Output file

../image/980uImage

原文地址:https://www.cnblogs.com/lianghong881018/p/12529687.html