RE: [PATCH] USB: ehci-mxc: get rid of the uses of cpu_is_mx()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> Peter Chen writes:
> > The patch removes all the uses of cpu_is_mx().  Instead, it utilizes
> > platform_device_id to distinguish the ehci differences among SoCs.
> > It can be useful to imx ehci submission and device tree support later.
> >
> >
> As the EHCI core is equivalent on all SoCs but only require different
> clocks on each platform I think it's overkill to use platform_ids to
> distinguish the SoCs. Indeed there is actually no need to make any
> distinction in the driver, as you could simply provide the same set of
> clocks on all platforms with some of them being dummy clocks on
> certain platforms:
> clock-imx25.c and clock-imx35.c:
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk)
> 	_REGISTER_CLOCK("mxc-ehci.0", "system_bus", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "system_bus", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "system_bus", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb_phy", dummy_clk)
> clock-imx27.c:
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk)
> 	_REGISTER_CLOCK("mxc-ehci.0", "system_bus", usb_clk1)
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb", usb_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "system_bus", usb_clk1)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb", usb_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "system_bus", usb_clk1)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb_phy", dummy_clk)
> clock-imx31.c:
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk1)
> 	_REGISTER_CLOCK("mxc-ehci.0", "system_bus", usb_clk2)
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb", usb_clk1)
> 	_REGISTER_CLOCK("mxc-ehci.1", "system_bus", usb_clk2)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb", usb_clk1)
> 	_REGISTER_CLOCK("mxc-ehci.2", "system_bus", usb_clk2)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb_phy", dummy_clk)
> clock-mx51-mx53.c:
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb", usboh3_clk)
> 	_REGISTER_CLOCK("mxc-ehci.0", "system_bus", usb_ahb_clk)
> 	_REGISTER_CLOCK("mxc-ehci.0", "usb_phy", usb_phy1_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb", usboh3_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "system_bus", usb_ahb_clk)
> 	_REGISTER_CLOCK("mxc-ehci.1", "usb_phy", dummy_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb", usboh3_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "system_bus", usb_ahb_clk)
> 	_REGISTER_CLOCK("mxc-ehci.2", "usb_phy", dummy_clk)
> 
> 
> In the driver you would then do a clk_get() for those three clocks
> independent of the platform.
> 
The reason why I add this patch is not for clk things, it is for:
1. Coming device driver
2. Handle things difference between SoC's. not only clk, others
like low power, wakeup, hsic, or other will comes in future.
> 
> Lothar Waßmann
> --
> ___________________________________________________________
> 
> Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
> Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
> Geschäftsführer: Matthias Kaussen
> Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
> 
> www.karo-electronics.de | info@xxxxxxxxxxxxxxxxxxx
> ___________________________________________________________

��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux