linux/drivers/bcma/driver_chipcommon_nflash.c
<<
>>
Prefs
   1/*
   2 * Broadcom specific AMBA
   3 * ChipCommon NAND flash interface
   4 *
   5 * Licensed under the GNU/GPL. See COPYING for details.
   6 */
   7
   8#include <linux/platform_device.h>
   9#include <linux/bcma/bcma.h>
  10
  11#include "bcma_private.h"
  12
  13struct platform_device bcma_nflash_dev = {
  14        .name           = "bcma_nflash",
  15        .num_resources  = 0,
  16};
  17
  18/* Initialize NAND flash access */
  19int bcma_nflash_init(struct bcma_drv_cc *cc)
  20{
  21        struct bcma_bus *bus = cc->core->bus;
  22
  23        if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 &&
  24            cc->core->id.rev != 0x38) {
  25                bcma_err(bus, "NAND flash on unsupported board!\n");
  26                return -ENOTSUPP;
  27        }
  28
  29        if (!(cc->capabilities & BCMA_CC_CAP_NFLASH)) {
  30                bcma_err(bus, "NAND flash not present according to ChipCommon\n");
  31                return -ENODEV;
  32        }
  33
        if (!(cc>""+code=platform_"=bus" class="sref">busL21>ENODEV;
  33
  18
   6<<<<<<<<<* malloc (requirAND y class=e.h" claass=") isring"available yet. ize NAND flash access */
       ce ef="+code=bcma_nflss="sred" class="sref">_device" cata"+code=platform_device" cata=bus" cref">  29        if (!(ccENODEV;
  33
 0lass="sref">ENODEV;
  32        }

The original LXR software  y nt">32">  32LXR iverus="y=bus" mit= experi 6  32lxr@/bcma.no"sred
ch_resuts"
	/bcma/bsubcooter">
lxr./bcma.no kindly hostAND y 32">  32RANpill Lbc_&o AS=bus" _&oviommeof Lbcux ivnultsash and opera