Skip to content

Commit 30c0368

Browse files
dougg3bebarino
authored andcommitted
clk: mmp: pxa168: fix incorrect parent clocks
The UART, SDHC, LCD, and CCIC peripherals' muxed parent clocks didn't match the information provided by the PXA168 datasheet: - The UART clocks can be 58.5 MHz or the UART PLL. Previously, the first mux option was being calculated as 117 MHz, confirmed on hardware to be incorrect. - The SDHC clocks can be 48 MHz, 52 MHz, or 78 MHz. Previously, 48 MHz and 52 MHz were swapped. 78 MHz wasn't listed as an option. - The LCD clock can be 624 MHz or 312 Mhz. Previously, it was being calculated as 312 MHz or 52 MHz. - The CCIC clock can be 156 MHz or 78 MHz. Previously, it was being calculated as 312 MHz or 52 MHz. Signed-off-by: Doug Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent e2fd64d commit 30c0368

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/clk/mmp/clk-of-pxa168.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static void pxa168_pll_init(struct pxa168_clk_unit *pxa_unit)
130130
static DEFINE_SPINLOCK(uart0_lock);
131131
static DEFINE_SPINLOCK(uart1_lock);
132132
static DEFINE_SPINLOCK(uart2_lock);
133-
static const char * const uart_parent_names[] = {"pll1_3_16", "uart_pll"};
133+
static const char * const uart_parent_names[] = {"pll1_2_3_16", "uart_pll"};
134134

135135
static DEFINE_SPINLOCK(ssp0_lock);
136136
static DEFINE_SPINLOCK(ssp1_lock);
@@ -192,20 +192,20 @@ static void pxa168_apb_periph_clk_init(struct pxa168_clk_unit *pxa_unit)
192192

193193
static DEFINE_SPINLOCK(sdh0_lock);
194194
static DEFINE_SPINLOCK(sdh1_lock);
195-
static const char * const sdh_parent_names[] = {"pll1_12", "pll1_13"};
195+
static const char * const sdh_parent_names[] = {"pll1_13", "pll1_12", "pll1_8"};
196196

197197
static DEFINE_SPINLOCK(usb_lock);
198198

199199
static DEFINE_SPINLOCK(disp0_lock);
200-
static const char * const disp_parent_names[] = {"pll1_2", "pll1_12"};
200+
static const char * const disp_parent_names[] = {"pll1", "pll1_2"};
201201

202202
static DEFINE_SPINLOCK(ccic0_lock);
203-
static const char * const ccic_parent_names[] = {"pll1_2", "pll1_12"};
203+
static const char * const ccic_parent_names[] = {"pll1_4", "pll1_8"};
204204
static const char * const ccic_phy_parent_names[] = {"pll1_6", "pll1_12"};
205205

206206
static struct mmp_param_mux_clk apmu_mux_clks[] = {
207-
{0, "sdh0_mux", sdh_parent_names, ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, APMU_SDH0, 6, 1, 0, &sdh0_lock},
208-
{0, "sdh1_mux", sdh_parent_names, ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, APMU_SDH1, 6, 1, 0, &sdh1_lock},
207+
{0, "sdh0_mux", sdh_parent_names, ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, APMU_SDH0, 6, 2, 0, &sdh0_lock},
208+
{0, "sdh1_mux", sdh_parent_names, ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, APMU_SDH1, 6, 2, 0, &sdh1_lock},
209209
{0, "disp0_mux", disp_parent_names, ARRAY_SIZE(disp_parent_names), CLK_SET_RATE_PARENT, APMU_DISP0, 6, 1, 0, &disp0_lock},
210210
{0, "ccic0_mux", ccic_parent_names, ARRAY_SIZE(ccic_parent_names), CLK_SET_RATE_PARENT, APMU_CCIC0, 6, 1, 0, &ccic0_lock},
211211
{0, "ccic0_phy_mux", ccic_phy_parent_names, ARRAY_SIZE(ccic_phy_parent_names), CLK_SET_RATE_PARENT, APMU_CCIC0, 7, 1, 0, &ccic0_lock},

0 commit comments

Comments
 (0)