diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-07-14 13:44:45 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-07-14 13:44:45 +0000 |
commit | a5c0ad6354b0df5216a26653b868b53329c61c69 (patch) | |
tree | da977722cdd32c9447957747cc316e2ca0b0e093 /target/linux/brcm47xx/patches-3.10/050-mtd_bcm47xxsflash_implement_ChipCommon_RW_ops.patch | |
parent | 3bc90a4d23e05be4a54edfccae3d45eefcfa5557 (diff) | |
download | mtk-20170518-a5c0ad6354b0df5216a26653b868b53329c61c69.zip mtk-20170518-a5c0ad6354b0df5216a26653b868b53329c61c69.tar.gz mtk-20170518-a5c0ad6354b0df5216a26653b868b53329c61c69.tar.bz2 |
brcm47xx: add initial support for kernel 3.10
SVN-Revision: 37287
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/050-mtd_bcm47xxsflash_implement_ChipCommon_RW_ops.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.10/050-mtd_bcm47xxsflash_implement_ChipCommon_RW_ops.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/050-mtd_bcm47xxsflash_implement_ChipCommon_RW_ops.patch b/target/linux/brcm47xx/patches-3.10/050-mtd_bcm47xxsflash_implement_ChipCommon_RW_ops.patch new file mode 100644 index 0000000..8f43ebb --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/050-mtd_bcm47xxsflash_implement_ChipCommon_RW_ops.patch @@ -0,0 +1,53 @@ +commit c8a1de474f49bd928f84e7a99b6f3d23a65b5637 +Author: Rafał Miłecki <zajec5@gmail.com> +Date: Sun Mar 24 21:53:24 2013 +0100 + + mtd: bcm47xxsflash: implement ChipCommon R/W ops + + They are needed for erasing/writing. Use a magic pointers and small + functions to preapre code for adding other buses support in the future + (like SSB). + + Signed-off-by: Rafał Miłecki <zajec5@gmail.com> + Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> + +--- a/drivers/mtd/devices/bcm47xxsflash.c ++++ b/drivers/mtd/devices/bcm47xxsflash.c +@@ -48,6 +48,17 @@ static void bcm47xxsflash_fill_mtd(struc + * BCMA + **************************************************/ + ++static int bcm47xxsflash_bcma_cc_read(struct bcm47xxsflash *b47s, u16 offset) ++{ ++ return bcma_cc_read32(b47s->bcma_cc, offset); ++} ++ ++static void bcm47xxsflash_bcma_cc_write(struct bcm47xxsflash *b47s, u16 offset, ++ u32 value) ++{ ++ bcma_cc_write32(b47s->bcma_cc, offset, value); ++} ++ + static int bcm47xxsflash_bcma_probe(struct platform_device *pdev) + { + struct bcma_sflash *sflash = dev_get_platdata(&pdev->dev); +@@ -62,6 +73,8 @@ static int bcm47xxsflash_bcma_probe(stru + sflash->priv = b47s; + + b47s->bcma_cc = container_of(sflash, struct bcma_drv_cc, sflash); ++ b47s->cc_read = bcm47xxsflash_bcma_cc_read; ++ b47s->cc_write = bcm47xxsflash_bcma_cc_write; + + switch (b47s->bcma_cc->capabilities & BCMA_CC_CAP_FLASHT) { + case BCMA_CC_FLASHT_STSER: +--- a/drivers/mtd/devices/bcm47xxsflash.h ++++ b/drivers/mtd/devices/bcm47xxsflash.h +@@ -60,6 +60,8 @@ enum bcm47xxsflash_type { + + struct bcm47xxsflash { + struct bcma_drv_cc *bcma_cc; ++ int (*cc_read)(struct bcm47xxsflash *b47s, u16 offset); ++ void (*cc_write)(struct bcm47xxsflash *b47s, u16 offset, u32 value); + + enum bcm47xxsflash_type type; + |