Hi David, > -----Original Message----- > From: Bhupesh SHARMA > Sent: Monday, February 14, 2011 9:25 AM > To: 'David Miller'; [email protected] > Cc: [email protected]; [email protected] > Subject: RE: [PATCH net-next-2.6 v7 1/1] can: c_can: Added support for > Bosch C_CAN controller > > Hi David, > > > -----Original Message----- > > From: David Miller [mailto:[email protected]] > > Sent: Monday, February 14, 2011 12:36 AM > > To: [email protected] > > Cc: Bhupesh SHARMA; [email protected]; Socketcan- > > [email protected] > > Subject: Re: [PATCH net-next-2.6 v7 1/1] can: c_can: Added support > for > > Bosch C_CAN controller > > > > From: David Miller <[email protected]> > > Date: Sun, 13 Feb 2011 10:52:16 -0800 (PST) > > > > > From: Marc Kleine-Budde <[email protected]> > > > Date: Sat, 12 Feb 2011 18:18:37 +0100 > > > > > >> On 02/11/2011 11:17 AM, Bhupesh Sharma wrote: > > >>> Bosch C_CAN controller is a full-CAN implementation which is > > compliant > > >>> to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual > > can be > > >>> obtained from: > > >>> http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/ > > >>> c_can/users_manual_c_can.pdf > > >>> > > >>> This patch adds the support for this controller. > > >>> The following are the design choices made while writing the > > controller > > >>> driver: > > >>> 1. Interface Register set IF1 has be used only in the current > > design. > > >>> 2. Out of the 32 Message objects available, 16 are kept aside for > > RX > > >>> purposes and the rest for TX purposes. > > >>> 3. NAPI implementation is such that both the TX and RX paths > > function > > >>> in polling mode. > > >>> > > >>> Signed-off-by: Bhupesh Sharma <[email protected]> > > >> > > >> Good work! > > >> > > >> Acked-by: Marc Kleine-Budde <[email protected]> > > > > > > Applied. > > > > Actually, I'm reverting because this causes build regressions: > > > > ERROR: "clk_get_rate" [drivers/net/can/c_can/c_can_platform.ko] > > undefined! > > ERROR: "clk_get" [drivers/net/can/c_can/c_can_platform.ko] undefined! > > ERROR: "clk_put" [drivers/net/can/c_can/c_can_platform.ko] undefined! > > Oops.. I will send a v8 to correct this compilation issue a.s.a.p. >
I realized the problem happens when one compiles c_can files for x86 platform. As I have a ARM based platform, I get the "clk_get_rate", "clk_get" and "clk_put" definitions correctly when I perform the build operations. Now there can be two approaches to solve this issue: 1. Restrict C_CAN build only for ARM based platforms by adding the dependency "depends on HAVE_CLK" in the Kconfig file for C_CAN. For e.g. see the I2C_DESIGNWARE case: http://lxr.linux.no/linux+v2.6.31/drivers/i2c/busses/Kconfig#L329 2. Add #if defined(CONFIG_HAVE_CLK) macros to protect this code in "c_can_platform.c" For e.g. see: http://lxr.linux.no/linux+v2.6.31/drivers/serial/sh-sci.c#L1085 IMHO, approach 2 seems better as it will allow C_CAN to work on x86 platforms as well which will suit Intel TopCliff platform also. Please let me know your views on the same and I will send a v8 accordingly. Regards, Bhupesh _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
