[POWERPC] Move CPM command handling into the cpm drivers
This patch moves the CPM command handling into commproc.c for CPM1 and cpm2_common.c. This is yet another preparation to get rid of drivers accessing the CPM via the global cpmp. Signed-off-by: Jochen Friedrich <jochen@scram.de> Acked-by: Scott Wood <scottwood@freescale.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
This commit is contained in:
committed by
Kumar Gala
parent
721c0c8af1
commit
362f9b6fa8
@@ -89,21 +89,12 @@
|
||||
* Delay to wait for SCC reset command to complete (in us)
|
||||
*/
|
||||
#define SCC_RESET_DELAY 50
|
||||
#define MAX_CR_CMD_LOOPS 10000
|
||||
|
||||
static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
|
||||
{
|
||||
const struct fs_platform_info *fpi = fep->fpi;
|
||||
int i;
|
||||
|
||||
W16(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | (op << 8));
|
||||
for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
|
||||
if ((R16(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
|
||||
return 0;
|
||||
|
||||
printk(KERN_ERR "%s(): Not able to issue CPM command\n",
|
||||
__FUNCTION__);
|
||||
return 1;
|
||||
return cpm_command(fpi->cp_command, op);
|
||||
}
|
||||
|
||||
static int do_pd_setup(struct fs_enet_private *fep)
|
||||
|
Reference in New Issue
Block a user