Skip to contentSkip to conversation

imx: Efika: Add pata device

PATCH New Arnaud Patard (Rtp) 2 participants 5 messages Jul 24, 2011 – Jul 26, 2011

lore
Share & tools
lore
#0 lore raw

cover imx: Efika: Add pata device

This patchset is adding ressources, clock and device declarations for the pata device available on imx51. Last patch enables pata on efika platforms. To be complete, this patchset needs a driver, which is about to be sent for merge to ata developers.

v2: Created a imx51_add_mxc_pata() as suggested
v3: Fix naming

Arnaud

#3 lore raw

PATCH 2/3 imx51: add pata clock

Quoted 21 lines · Arnaud Patard

Define the clock used by the imx51 pata device.

Index: linux-2.6-submit/arch/arm/mach-mx5/clock-mx51-mx53.c
===================================================================

arch/arm/mach-mx5/clock-mx51-mx53.c +4 -0
@@ -1414,6 +1414,10 @@ DEFINE_CLOCK(ipu_di0_clk, 0, MXC_CCM_CCG
 DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET,
 		NULL, NULL, &pll3_sw_clk, NULL);
 
+/* PATA */
+DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG0_OFFSET,
+		NULL, NULL, &ipg_clk, &spba_clk);
+
 #define _REGISTER_CLOCK(d, n, c) \
        { \
 		.dev_id = d, \

arch/arm/mach-mx5/clock-mx51-mx53.c static struct clk_lookup mx51_lookups[] · line 1473

Quoted 4 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +1 -0
@@ -1466,6 +1470,7 @@ static struct clk_lookup mx51_lookups[]
 	_REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk)
 	_REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk)
 	_REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk)
+	_REGISTER_CLOCK("imx-pata", NULL, pata_clk)

First argument to _REGISTER_CLOCK must match the device name, but the driver you posted uses pata_imx as device name. The second argument which you correctly set to NULL here is an additional identifier which must match if it exists. There is only one clock in the pata driver, so you should use clk_get(&pdev->dev, NULL) in you driver.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |