99#include "isp-ipc.h"
1010#include "isp-regs.h"
1111
12- #define ISP_FIRMWARE_MDELAY 1
13- #define ISP_FIRMWARE_MAX_TRIES 1000
12+ #define ISP_FIRMWARE_MDELAY 1
13+ #define ISP_FIRMWARE_MAX_TRIES 1000
1414
15- #define ISP_FIRMWARE_IPC_SIZE 0x1c000
16- #define ISP_FIRMWARE_DATA_SIZE 0x28000
15+ #define ISP_FIRMWARE_IPC_SIZE 0x1c000
16+ #define ISP_FIRMWARE_DATA_SIZE 0x28000
1717
18- static inline u32 isp_asc_read32 (struct apple_isp * isp , u32 reg )
18+ static inline u32 isp_coproc_read32 (struct apple_isp * isp , u32 reg )
1919{
20- return readl (isp -> asc + reg );
20+ return readl (isp -> coproc + reg );
2121}
2222
23- static inline void isp_asc_write32 (struct apple_isp * isp , u32 reg , u32 val )
23+ static inline void isp_coproc_write32 (struct apple_isp * isp , u32 reg , u32 val )
2424{
25- writel (val , isp -> asc + reg );
25+ writel (val , isp -> coproc + reg );
2626}
2727
2828static inline u32 isp_gpio_read32 (struct apple_isp * isp , u32 reg )
@@ -129,22 +129,22 @@ static int isp_coproc_ready(struct apple_isp *isp)
129129 int retries ;
130130 u32 status ;
131131
132- isp_asc_write32 (isp , ISP_ASC_EDPRCR , 0x2 );
132+ isp_coproc_write32 (isp , ISP_COPROC_EDPRCR , 0x2 );
133133
134- isp_asc_write32 (isp , ISP_ASC_PMGR_0 , 0xff00ff );
135- isp_asc_write32 (isp , ISP_ASC_PMGR_1 , 0xff00ff );
136- isp_asc_write32 (isp , ISP_ASC_PMGR_2 , 0xff00ff );
137- isp_asc_write32 (isp , ISP_ASC_PMGR_3 , 0xff00ff );
134+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_0 , 0xff00ff );
135+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_1 , 0xff00ff );
136+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_2 , 0xff00ff );
137+ isp_coproc_write32 (isp , ISP_COPROC_PMGR_3 , 0xff00ff );
138138
139- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_0 , 0xffffffff );
140- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_1 , 0xffffffff );
141- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_2 , 0xffffffff );
142- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_3 , 0xffffffff );
143- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_4 , 0xffffffff );
144- isp_asc_write32 (isp , ISP_ASC_IRQ_MASK_5 , 0xffffffff );
139+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_0 , 0xffffffff );
140+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_1 , 0xffffffff );
141+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_2 , 0xffffffff );
142+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_3 , 0xffffffff );
143+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_4 , 0xffffffff );
144+ isp_coproc_write32 (isp , ISP_COPROC_IRQ_MASK_5 , 0xffffffff );
145145
146146 for (retries = 0 ; retries < ISP_FIRMWARE_MAX_TRIES ; retries ++ ) {
147- status = isp_asc_read32 (isp , ISP_ASC_STATUS );
147+ status = isp_coproc_read32 (isp , ISP_COPROC_STATUS );
148148 if (!((status & 0x3 ) == 0 )) {
149149 isp_dbg (isp , "%d: coproc in WFI (status: 0x%x)\n" ,
150150 retries , status );
@@ -162,7 +162,7 @@ static int isp_coproc_ready(struct apple_isp *isp)
162162
163163static void isp_firmware_shutdown_stage1 (struct apple_isp * isp )
164164{
165- isp_asc_write32 (isp , ISP_ASC_CONTROL , 0x0 );
165+ isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x0 );
166166}
167167
168168static int isp_firmware_boot_stage1 (struct apple_isp * isp )
@@ -186,8 +186,8 @@ static int isp_firmware_boot_stage1(struct apple_isp *isp)
186186
187187 isp_mbox_write32 (isp , ISP_MBOX_IRQ_ENABLE , 0x0 );
188188
189- isp_asc_write32 (isp , ISP_ASC_CONTROL , 0x0 );
190- isp_asc_write32 (isp , ISP_ASC_CONTROL , 0x10 );
189+ isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x0 );
190+ isp_coproc_write32 (isp , ISP_COPROC_CONTROL , 0x10 );
191191
192192 /* Wait for ISP_GPIO_7 to 0x0 -> 0x8042006 */
193193 isp_gpio_write32 (isp , ISP_GPIO_7 , 0x0 );
0 commit comments