1010#include "isp-ipc.h"
1111#include "isp-regs.h"
1212
13- #define ISP_FIRMWARE_MDELAY 1
14- #define ISP_FIRMWARE_MAX_TRIES 1000
13+ #define ISP_FIRMWARE_MDELAY 1
14+ #define ISP_FIRMWARE_MAX_TRIES 1000
1515
16- #define ISP_FIRMWARE_IPC_SIZE 0x1c000
17- #define ISP_FIRMWARE_DATA_SIZE 0x28000
16+ #define ISP_FIRMWARE_IPC_SIZE 0x1c000
17+ #define ISP_FIRMWARE_DATA_SIZE 0x28000
1818
19- static inline u32 isp_asc_read32 (struct apple_isp * isp , u32 reg )
19+ static inline u32 isp_coproc_read32 (struct apple_isp * isp , u32 reg )
2020{
21- return readl (isp -> asc + reg );
21+ return readl (isp -> coproc + reg );
2222}
2323
24- static inline void isp_asc_write32 (struct apple_isp * isp , u32 reg , u32 val )
24+ static inline void isp_coproc_write32 (struct apple_isp * isp , u32 reg , u32 val )
2525{
26- writel (val , isp -> asc + reg );
26+ writel (val , isp -> coproc + reg );
2727}
2828
2929static inline u32 isp_gpio_read32 (struct apple_isp * isp , u32 reg )
@@ -130,22 +130,22 @@ static int isp_coproc_ready(struct apple_isp *isp)
130130 int retries ;
131131 u32 status ;
132132
133- isp_asc_write32 (isp , ISP_ASC_EDPRCR , 0x2 );
133+ isp_coproc_write32 (isp , ISP_COPROC_EDPRCR , 0x2 );
134134
135- isp_asc_write32 (isp , ISP_ASC_PMGR_0 , 0xff00ff );
136- isp_asc_write32 (isp , ISP_ASC_PMGR_1 , 0xff00ff );
137- isp_asc_write32 (isp , ISP_ASC_PMGR_2 , 0xff00ff );
138- isp_asc_write32 (isp , ISP_ASC_PMGR_3 , 0xff00ff );
135+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_0 , 0xff00ff );
136+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_1 , 0xff00ff );
137+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_2 , 0xff00ff );
138+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_3 , 0xff00ff );
139139
140- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_0 , 0xffffffff );
141- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_1 , 0xffffffff );
142- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_2 , 0xffffffff );
143- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_3 , 0xffffffff );
144- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_4 , 0xffffffff );
145- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_5 , 0xffffffff );
140+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_0 , 0xffffffff );
141+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_1 , 0xffffffff );
142+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_2 , 0xffffffff );
143+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_3 , 0xffffffff );
144+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_4 , 0xffffffff );
145+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_5 , 0xffffffff );
146146
147147 for (retries = 0 ; retries < ISP_FIRMWARE_MAX_TRIES ; retries ++ ) {
148- status = isp_asc_read32 (isp , ISP_ASC_STATUS );
148+ status = isp_coproc_read32 (isp , ISP_COPROC_STATUS );
149149 if (!((status & 0x3 ) == 0 )) {
150150 isp_dbg (isp , "%d: coproc in WFI (status: 0x%x)\n" ,
151151 retries , status );
@@ -163,7 +163,7 @@ static int isp_coproc_ready(struct apple_isp *isp)
163163
164164static void isp_firmware_shutdown_stage1 (struct apple_isp * isp )
165165{
166- isp_asc_write32 (isp , ISP_ASC_CONTROL , 0x0 );
166+ isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x0 );
167167}
168168
169169static int isp_firmware_boot_stage1 (struct apple_isp * isp )
@@ -187,8 +187,8 @@ static int isp_firmware_boot_stage1(struct apple_isp *isp)
187187
188188 isp_mbox_write32 (isp , ISP_MBOX_IRQ_ENABLE , 0x0 );
189189
190- isp_asc_write32 (isp , ISP_ASC_CONTROL , 0x0 );
191- isp_asc_write32 (isp , ISP_ASC_CONTROL , 0x10 );
190+ isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x0 );
191+ isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x10 );
192192
193193 /* Wait for ISP_GPIO_7 to 0x0 -> 0x8042006 */
194194 isp_gpio_write32 (isp , ISP_GPIO_7 , 0x0 );
0 commit comments