Changeset 31707


Ignore:
Timestamp:
Mar 19, 2017, 2:58:06 PM (5 weeks ago)
Author:
brainslayer
Message:

compiles on northstar, but nand driver will likelly not work yet. still something todo

Location:
src/linux/universal/linux-4.9
Files:
157 added
9 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/.config_northstar_smp

    r31706 r31707  
    24182418# CONFIG_DEBUG_FS is not set
    24192419# CONFIG_HEADERS_CHECK is not set
    2420 # CONFIG_DEBUG_SECTION_MISMATCH is not set
     2420CONFIG_DEBUG_SECTION_MISMATCH=y
    24212421# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
    24222422CONFIG_FRAME_POINTER=y
  • src/linux/universal/linux-4.9/arch/arm/mach-brcm-hnd/board_ns.c

    r31673 r31707  
    167167}
    168168
    169 void board_init_timer(void)
     169void __init board_init_timer(void)
    170170{
    171171        /* Get global SB handle */
     
    352352//#endif
    353353
    354 void brcm_reset(char mode, const char *cmd)
     354static void brcm_reset(enum reboot_mode mode, const char *cmd)
    355355{
    356356#ifdef CONFIG_OUTER_CACHE_SYNC
     
    535535extern int __init root_dev_setup(char *line);
    536536
    537 struct mtd_partition *init_mtd_partitions(hndsflash_t * sfl_info, struct mtd_info *mtd, size_t size)
     537struct mtd_partition __init *init_mtd_partitions(hndsflash_t * sfl_info, struct mtd_info *mtd, size_t size)
    538538{
    539539        int bootdev;
  • src/linux/universal/linux-4.9/arch/arm/mach-brcm-hnd/gpio.c

    r31574 r31707  
    8787}
    8888
    89 int gpio_kernel_api(unsigned int cmd, unsigned int mask, unsigned int val)
     89int __init gpio_kernel_api(unsigned int cmd, unsigned int mask, unsigned int val)
    9090{
    9191
  • src/linux/universal/linux-4.9/arch/arm/plat-brcm/bcm5301x.c

    r31574 r31707  
    765765};
    766766
    767 static void __init chipinfo_proc_init(void)
     767static int __init chipinfo_proc_init(void)
    768768{
    769769        struct proc_dir_entry *chip_info;
     
    772772        if (!chip_info) {
    773773                printk(KERN_ERR "%s: Create proc entry failed.\n", __FUNCTION__);
    774                 return;
    775         }
     774                return -1;
     775        }
     776        return 0;
    776777}
    777778
  • src/linux/universal/linux-4.9/arch/arm/plat-brcm/clkdev.c

    r31574 r31707  
    133133};
    134134
    135 static struct clk_lookup * __init_refok
     135static struct clk_lookup * __ref
    136136vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
    137137        va_list ap)
  • src/linux/universal/linux-4.9/arch/arm/plat-brcm/nvram_linux.c

    r31574 r31707  
    5454
    5555/* Temp buffer to hold the nvram transfered romboot CFE */
    56 char __initdata ram_nvram_buf[MAX_NVRAM_SPACE] __attribute__((aligned(PAGE_SIZE)));
     56char ram_nvram_buf[MAX_NVRAM_SPACE] __attribute__((aligned(PAGE_SIZE)));
    5757
    5858/* In BSS to minimize text size and page aligned so it can be mmap()-ed */
     
    140140
    141141/* Probe for NVRAM header */
    142 static int
     142int
    143143early_nvram_init(void)
    144144{
     
    263263
    264264/* Early (before mm or mtd) read-only access to NVRAM */
    265 static char *
     265char *
    266266early_nvram_get(const char *name)
    267267{
     
    296296}
    297297
    298 static int
     298int
    299299early_nvram_getall(char *buf, int count)
    300300{
  • src/linux/universal/linux-4.9/drivers/clk/Kconfig

    r31574 r31707  
    55
    66config HAVE_CLK_PREPARE
     7        bool
     8       
     9config HAVE_MACH_CLKDEV
    710        bool
    811
  • src/linux/universal/linux-4.9/drivers/mtd/bcm947xx/nand/brcmnand.c

    r31574 r31707  
    6060#include <bcmutils.h>
    6161
     62
     63struct nand_ecclayout {
     64        __u32 eccbytes;
     65        __u32 eccpos[MTD_MAX_ECCPOS_ENTRIES];
     66        __u32 oobavail;
     67        struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
     68};
    6269/*
    6370 * Because the bcm_nflash doesn't consider second chip case,
     
    9198        struct nand_ecclayout   ecclayout;
    9299        int                     cmd_ret;        /* saved error code */
    93         int                     page_addr;      /* saved page address from SEQIN */
    94100        unsigned char           oob_index;
    95101        unsigned char           id_byte_index;
     
    285291        layout->oobavail = ((oob_per_sec - ecc_per_sec) << brcmnand->sec_per_page_shift) - 1;
    286292
    287         brcmnand->mtd.oobavail = layout->oobavail;
     293//      brcmnand->mtd.oobavail = layout->oobavail;
    288294//      brcmnand->chip.ecclayout = layout;
    289         brcmnand->chip.ecc.layout = layout;
    290 
     295//      brcmnand->chip.ecc.layout = layout;
     296        mtd_set_ooblayout(&brcmnand->mtd, &nand_ooblayout_lp_ops);
    291297        /* Output layout for debugging */
    292298        printk("Spare area=%d eccbytes %d, ecc bytes located at:\n",
     
    380386brcmnand_dev_ready(struct mtd_info *mtd)
    381387{
    382         struct nand_chip *chip = (struct nand_chip *)mtd->priv;
     388        struct nand_chip *chip = mtd_to_nand(mtd);;
    383389        struct brcmnand_mtd *brcmnand = (struct brcmnand_mtd *)chip->priv;
    384390
     
    499505 * INTERNAL - do page write, with or without ECC generation enabled
    500506 */
     507 
     508 
    501509static void
    502 _brcmnand_write_page_do(struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *buf, bool ecc)
     510_brcmnand_write_page_do(struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *buf, int page, bool ecc)
    503511{
    504512        struct brcmnand_mtd *brcmnand = chip->priv;
     
    507515        int i;
    508516
    509         BUG_ON(brcmnand->page_addr == 0);
    510517        BUG_ON(mtd->oobsize > sizeof(tmp_poi));
    511518
    512519        /* Retreive pre-existing OOB values */
    513520        memcpy(tmp_poi, chip->oob_poi, mtd->oobsize);
    514         brcmnand->cmd_ret = brcmnand_read_oob(mtd, chip, brcmnand->page_addr);
     521        brcmnand->cmd_ret = brcmnand_read_oob(mtd, chip, page);
    515522        if (brcmnand->cmd_ret < 0)
    516523                return;
     
    520527                chip->oob_poi[i] &= tmp_poi[i];
    521528
    522         nand_addr = ((uint64)brcmnand->page_addr << chip->page_shift);
     529                       
     530        nand_addr = ((uint64)page << chip->page_shift);
    523531        brcmnand->cmd_ret = hndnand_write_page(brcmnand->nfl, nand_addr, buf,
    524532                chip->oob_poi, ecc);
     
    532540static int
    533541brcmnand_write_page_ecc(struct mtd_info *mtd, struct nand_chip *chip,
    534                 const uint8_t *buf, int oob_required)
    535 {
    536         _brcmnand_write_page_do(mtd, chip, buf, TRUE);
     542                const uint8_t *buf, int oob_required, int page)
     543{
     544        _brcmnand_write_page_do(mtd, chip, buf, page, TRUE);
    537545        return 0;
    538546}
     
    543551static int
    544552brcmnand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
    545                 const uint8_t *buf, int oob_required)
     553                const uint8_t *buf, int oob_required, int page)
    546554{
    547555        printk(KERN_INFO "%s: Enter!\n", __FUNCTION__);
    548556
    549         _brcmnand_write_page_do(mtd, chip, buf, FALSE);
     557        _brcmnand_write_page_do(mtd, chip, buf, page, FALSE);
    550558        return 0;
    551559}
     
    560568brcmnand_read_byte(struct mtd_info *mtd)
    561569{
    562         struct nand_chip *chip = mtd->priv;
     570        struct nand_chip *chip = mtd_to_nand(mtd);
    563571        struct brcmnand_mtd *brcmnand = chip->priv;
    564572        uint32 reg;
     
    618626brcmnand_select_chip(struct mtd_info *mtd, int chip_num)
    619627{
    620         struct nand_chip *chip = mtd->priv;
     628        struct nand_chip *chip = mtd_to_nand(mtd);
    621629        struct brcmnand_mtd *brcmnand = chip->priv;
    622630        /* chip_num == -1 means de-select the device */
     
    633641brcmnand_cmdfunc(struct mtd_info *mtd, unsigned command, int column, int page_addr)
    634642{
    635         struct nand_chip *chip = mtd->priv;
     643        struct nand_chip *chip = mtd_to_nand(mtd);
    636644        struct brcmnand_mtd *brcmnand = chip->priv;
    637645        uint64 nand_addr;
     
    656664                case NAND_CMD_SEQIN:
    657665                        BUG_ON(column >= mtd->writesize);
    658                         brcmnand->page_addr = page_addr;
    659666                        nand_addr = (uint64) column | ((uint64)page_addr << chip->page_shift);
    660667                        hndnand_cmdfunc(brcmnand->nfl, nand_addr, CMDFUNC_SEQIN);
     
    699706brcmnand_scan(struct mtd_info *mtd)
    700707{
    701         struct nand_chip *chip = mtd->priv;
     708        struct nand_chip *chip = mtd_to_nand(mtd);
    702709        struct brcmnand_mtd *brcmnand = chip->priv;
    703710        hndnand_t *nfl = brcmnand->nfl;
     
    727734                return ret;
    728735
    729         pr_debug( "%s: layout.oobavail=%d\n", __func__,
    730                 chip->ecc.layout->oobavail);
     736//      pr_debug( "%s: layout.oobavail=%d\n", __func__,
     737//              chip->ecc.layout->oobavail);
    731738
    732739        ret = nand_scan_tail(mtd);
     
    777784brcmnand_command_lp(struct mtd_info *mtd, unsigned int command, int column, int page_addr)
    778785{
    779         register struct nand_chip *chip = mtd->priv;
     786        register struct nand_chip *chip = mtd_to_nand(mtd);
    780787
    781788        /* Emulate NAND_CMD_READOOB */
     
    894901brcmnand_command(struct mtd_info *mtd, unsigned int command, int column, int page_addr)
    895902{
    896         register struct nand_chip *chip = mtd->priv;
     903        register struct nand_chip *chip = mtd_to_nand(mtd);
    897904        int ctrl = NAND_CTRL_CLE;
    898905
     
    10201027        int knldev;
    10211028        int offset = 0;
    1022         struct nand_chip *chip = mtd->priv;
     1029        struct nand_chip *chip = mtd_to_nand(mtd);
    10231030        struct brcmnand_mtd *brcmnand = chip->priv;
    10241031        int isbufdual=0;
  • src/linux/universal/linux-4.9/include/linux/netdev_features.h

    r31574 r31707  
    171171#define NETIF_F_GSO_SOFTWARE    (NETIF_F_ALL_TSO | NETIF_F_UFO | \
    172172                                 NETIF_F_GSO_SCTP)
     173                                 
     174#define NETIF_F_GEN_CSUM        NETIF_F_HW_CSUM
     175#define NETIF_F_V4_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IP_CSUM)
     176#define NETIF_F_V6_CSUM         (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
     177#define NETIF_F_ALL_CSUM        (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM)
     178
    173179
    174180/*
Note: See TracChangeset for help on using the changeset viewer.