diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2010-08-22 19:22:01 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2010-08-22 19:22:01 +0000 |
commit | f313fa0bd7b619735531b2c4b8d439ff523fc20c (patch) | |
tree | ee45f908454dc4f4106c9bc773bbfc1b00a0b18d /target/linux/generic/patches-2.6.34 | |
parent | 8b778d5ba3e00c78f5d86024303f88b1dcd03002 (diff) | |
download | upstream-f313fa0bd7b619735531b2c4b8d439ff523fc20c.tar.gz upstream-f313fa0bd7b619735531b2c4b8d439ff523fc20c.tar.bz2 upstream-f313fa0bd7b619735531b2c4b8d439ff523fc20c.zip |
kernel: fix some mistakes in ssb patch refresh in r22766, r22767 and r22768.
SVN-Revision: 22774
Diffstat (limited to 'target/linux/generic/patches-2.6.34')
-rw-r--r-- | target/linux/generic/patches-2.6.34/975-ssb_update.patch | 45 | ||||
-rw-r--r-- | target/linux/generic/patches-2.6.34/977-ssb_export_fallback_sprom.patch | 2 |
2 files changed, 4 insertions, 43 deletions
diff --git a/target/linux/generic/patches-2.6.34/975-ssb_update.patch b/target/linux/generic/patches-2.6.34/975-ssb_update.patch index 45be0b7ae8..e9b06d06bf 100644 --- a/target/linux/generic/patches-2.6.34/975-ssb_update.patch +++ b/target/linux/generic/patches-2.6.34/975-ssb_update.patch @@ -385,7 +385,7 @@ u32 pmucap; if (!(cc->capabilities & SSB_CHIPCO_CAP_PMU)) -@@ -516,15 +516,12 @@ void ssb_pmu_init(struct ssb_chipcommon +@@ -516,15 +516,12 @@ void ssb_pmu_init(struct ssb_chipcommon ssb_dprintk(KERN_DEBUG PFX "Found rev %u PMU (capabilities 0x%08X)\n", cc->pmu.rev, pmucap); @@ -527,35 +527,6 @@ /* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */ #define SPEX16(_outvar, _offset, _mask, _shift) \ out->_outvar = ((in[SPOFF(_offset)] & (_mask)) >> (_shift)) -@@ -623,6 +623,28 @@ static int ssb_pci_sprom_get(struct ssb_ - - if (!ssb_is_sprom_available(bus)) { - ssb_printk(KERN_ERR PFX "No SPROM available!\n"); -+ return -ENODEV; -+ } -+ if (bus->chipco.dev) { /* can be unavailible! */ -+ /* -+ * get SPROM offset: SSB_SPROM_BASE1 except for -+ * chipcommon rev >= 31 or chip ID is 0x4312 and -+ * chipcommon status & 3 == 2 -+ */ -+ if (bus->chipco.dev->id.revision >= 31) -+ bus->sprom_offset = SSB_SPROM_BASE31; -+ else if (bus->chip_id == 0x4312 && -+ (bus->chipco.status & 0x03) == 2) -+ bus->sprom_offset = SSB_SPROM_BASE31; -+ else -+ bus->sprom_offset = SSB_SPROM_BASE1; -+ } else { -+ bus->sprom_offset = SSB_SPROM_BASE1; -+ } -+ ssb_dprintk(KERN_INFO PFX "SPROM offset is 0x%x\n", bus->sprom_offset); -+ -+ if (!ssb_is_sprom_available(bus)) { -+ ssb_printk(KERN_ERR PFX "No SPROM available!\n"); - return -ENODEV; - } - if (bus->chipco.dev) { /* can be unavailible! */ --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h @@ -167,7 +167,7 @@ struct ssb_device { @@ -567,17 +538,7 @@ struct ssb_bus *bus; struct ssb_device_id id; -@@ -398,6 +398,9 @@ extern void ssb_bus_unregister(struct ss - /* Does the device have an SPROM? */ - extern bool ssb_is_sprom_available(struct ssb_bus *bus); - -+/* Does the device have an SPROM? */ -+extern bool ssb_is_sprom_available(struct ssb_bus *bus); -+ - /* Set a fallback SPROM. - * See kdoc at the function definition for complete documentation. */ - extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); -@@ -470,14 +473,6 @@ extern u32 ssb_dma_translation(struct ss +@@ -470,14 +470,6 @@ extern u32 ssb_dma_translation(struct ss #define SSB_DMA_TRANSLATION_MASK 0xC0000000 #define SSB_DMA_TRANSLATION_SHIFT 30 @@ -592,7 +553,7 @@ static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev) { #ifdef CONFIG_SSB_DEBUG -@@ -486,155 +481,6 @@ static inline void __cold __ssb_dma_not_ +@@ -486,155 +478,6 @@ static inline void __cold __ssb_dma_not_ #endif /* DEBUG */ } diff --git a/target/linux/generic/patches-2.6.34/977-ssb_export_fallback_sprom.patch b/target/linux/generic/patches-2.6.34/977-ssb_export_fallback_sprom.patch index 3fab483858..2a22a3a38f 100644 --- a/target/linux/generic/patches-2.6.34/977-ssb_export_fallback_sprom.patch +++ b/target/linux/generic/patches-2.6.34/977-ssb_export_fallback_sprom.patch @@ -10,7 +10,7 @@ bool ssb_is_sprom_available(struct ssb_bus *bus) --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h -@@ -404,6 +404,7 @@ extern bool ssb_is_sprom_available(struc +@@ -401,6 +401,7 @@ extern bool ssb_is_sprom_available(struc /* Set a fallback SPROM. * See kdoc at the function definition for complete documentation. */ extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); |