aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/platforms/pmac_feature.c4
-rw-r--r--arch/ppc64/kernel/pmac_feature.c29
2 files changed, 29 insertions, 4 deletions
diff --git a/arch/ppc/platforms/pmac_feature.c b/arch/ppc/platforms/pmac_feature.c
index 24b42fd9e014..46cbf36722db 100644
--- a/arch/ppc/platforms/pmac_feature.c
+++ b/arch/ppc/platforms/pmac_feature.c
@@ -74,8 +74,7 @@ static DEFINE_SPINLOCK(feature_lock __pmacdata);
74 */ 74 */
75struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata; 75struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata;
76 76
77struct macio_chip* __pmac 77struct macio_chip* __pmac macio_find(struct device_node* child, int type)
78macio_find(struct device_node* child, int type)
79{ 78{
80 while(child) { 79 while(child) {
81 int i; 80 int i;
@@ -88,6 +87,7 @@ macio_find(struct device_node* child, int type)
88 } 87 }
89 return NULL; 88 return NULL;
90} 89}
90EXPORT_SYMBOL_GPL(macio_find);
91 91
92static const char* macio_names[] __pmacdata = 92static const char* macio_names[] __pmacdata =
93{ 93{
diff --git a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c
index 086abc1bcca1..98ed2bccab1a 100644
--- a/arch/ppc64/kernel/pmac_feature.c
+++ b/arch/ppc64/kernel/pmac_feature.c
@@ -64,8 +64,7 @@ static DEFINE_SPINLOCK(feature_lock __pmacdata);
64 */ 64 */
65struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata; 65struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata;
66 66
67struct macio_chip* __pmac 67struct macio_chip* __pmac macio_find(struct device_node* child, int type)
68macio_find(struct device_node* child, int type)
69{ 68{
70 while(child) { 69 while(child) {
71 int i; 70 int i;
@@ -78,6 +77,7 @@ macio_find(struct device_node* child, int type)
78 } 77 }
79 return NULL; 78 return NULL;
80} 79}
80EXPORT_SYMBOL_GPL(macio_find);
81 81
82static const char* macio_names[] __pmacdata = 82static const char* macio_names[] __pmacdata =
83{ 83{
@@ -250,6 +250,30 @@ static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long v
250 return 0; 250 return 0;
251} 251}
252 252
253static long __pmac g5_i2s_enable(struct device_node *node, long param, long value)
254{
255 /* Very crude implementation for now */
256 struct macio_chip* macio = &macio_chips[0];
257 unsigned long flags;
258
259 if (value == 0)
260 return 0; /* don't disable yet */
261
262 LOCK(flags);
263 MACIO_BIS(KEYLARGO_FCR3, KL3_CLK45_ENABLE | KL3_CLK49_ENABLE |
264 KL3_I2S0_CLK18_ENABLE);
265 udelay(10);
266 MACIO_BIS(KEYLARGO_FCR1, K2_FCR1_I2S0_CELL_ENABLE |
267 K2_FCR1_I2S0_CLK_ENABLE_BIT | K2_FCR1_I2S0_ENABLE);
268 udelay(10);
269 MACIO_BIC(KEYLARGO_FCR1, K2_FCR1_I2S0_RESET);
270 UNLOCK(flags);
271 udelay(10);
272
273 return 0;
274}
275
276
253#ifdef CONFIG_SMP 277#ifdef CONFIG_SMP
254static long __pmac g5_reset_cpu(struct device_node* node, long param, long value) 278static long __pmac g5_reset_cpu(struct device_node* node, long param, long value)
255{ 279{
@@ -337,6 +361,7 @@ static struct feature_table_entry g5_features[] __pmacdata = {
337 { PMAC_FTR_READ_GPIO, g5_read_gpio }, 361 { PMAC_FTR_READ_GPIO, g5_read_gpio },
338 { PMAC_FTR_WRITE_GPIO, g5_write_gpio }, 362 { PMAC_FTR_WRITE_GPIO, g5_write_gpio },
339 { PMAC_FTR_GMAC_PHY_RESET, g5_eth_phy_reset }, 363 { PMAC_FTR_GMAC_PHY_RESET, g5_eth_phy_reset },
364 { PMAC_FTR_SOUND_CHIP_ENABLE, g5_i2s_enable },
340#ifdef CONFIG_SMP 365#ifdef CONFIG_SMP
341 { PMAC_FTR_RESET_CPU, g5_reset_cpu }, 366 { PMAC_FTR_RESET_CPU, g5_reset_cpu },
342#endif /* CONFIG_SMP */ 367#endif /* CONFIG_SMP */