diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-05-08 09:22:36 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-09-21 02:38:22 -0400 |
commit | f377bff0235708ded5f94e581855d6bd678cd2d1 (patch) | |
tree | 774cda8108112b637350f922a6911581d03d84dc /drivers/net/can | |
parent | 749de6fce2dd67b40f4118bf694be37f9093c3f5 (diff) |
can: flexcan: rename feature into quirks
This patch renames the "features" member of struct flexcan_devtype_data to
"quirks". The corresponding defines are renamed too, to reflect what they
actually do.
FLEXCAN_HAS_V10_FEATURES -> FLEXCAN_QUIRK_DISABLE_RXFG
FLEXCAN_HAS_BROKEN_ERR_STATE -> FLEXCAN_QUIRK_BROKEN_ERR_STATE
FLEXCAN_HAS_MECR_FEATURES -> FLEXCAN_QUIRK_DISABLE_MECR
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/flexcan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 70cdbfcebb46..dd5a9353e0c5 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
@@ -187,9 +187,9 @@ | |||
187 | * | 187 | * |
188 | * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. | 188 | * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. |
189 | */ | 189 | */ |
190 | #define FLEXCAN_HAS_V10_FEATURES BIT(1) /* For core version >= 10 */ | 190 | #define FLEXCAN_QUIRK_BROKEN_ERR_STATE BIT(1) /* [TR]WRN_INT not connected */ |
191 | #define FLEXCAN_HAS_BROKEN_ERR_STATE BIT(2) /* [TR]WRN_INT not connected */ | 191 | #define FLEXCAN_QUIRK_DISABLE_RXFG BIT(2) /* Disable RX FIFO Global mask */ |
192 | #define FLEXCAN_HAS_MECR_FEATURES BIT(3) /* Memory error detection */ | 192 | #define FLEXCAN_QUIRK_DISABLE_MECR BIT(3) /* Disble Memory error detection */ |
193 | 193 | ||
194 | /* Structure of the message buffer */ | 194 | /* Structure of the message buffer */ |
195 | struct flexcan_mb { | 195 | struct flexcan_mb { |
@@ -244,7 +244,7 @@ struct flexcan_regs { | |||
244 | }; | 244 | }; |
245 | 245 | ||
246 | struct flexcan_devtype_data { | 246 | struct flexcan_devtype_data { |
247 | u32 features; /* hardware controller features */ | 247 | u32 quirks; /* quirks needed for different IP cores */ |
248 | }; | 248 | }; |
249 | 249 | ||
250 | struct flexcan_priv { | 250 | struct flexcan_priv { |
@@ -263,17 +263,17 @@ struct flexcan_priv { | |||
263 | }; | 263 | }; |
264 | 264 | ||
265 | static struct flexcan_devtype_data fsl_p1010_devtype_data = { | 265 | static struct flexcan_devtype_data fsl_p1010_devtype_data = { |
266 | .features = FLEXCAN_HAS_BROKEN_ERR_STATE, | 266 | .quirks = FLEXCAN_QUIRK_BROKEN_ERR_STATE, |
267 | }; | 267 | }; |
268 | 268 | ||
269 | static struct flexcan_devtype_data fsl_imx28_devtype_data; | 269 | static struct flexcan_devtype_data fsl_imx28_devtype_data; |
270 | 270 | ||
271 | static struct flexcan_devtype_data fsl_imx6q_devtype_data = { | 271 | static struct flexcan_devtype_data fsl_imx6q_devtype_data = { |
272 | .features = FLEXCAN_HAS_V10_FEATURES, | 272 | .quirks = FLEXCAN_QUIRK_DISABLE_RXFG, |
273 | }; | 273 | }; |
274 | 274 | ||
275 | static struct flexcan_devtype_data fsl_vf610_devtype_data = { | 275 | static struct flexcan_devtype_data fsl_vf610_devtype_data = { |
276 | .features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_MECR_FEATURES, | 276 | .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_DISABLE_MECR, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static const struct can_bittiming_const flexcan_bittiming_const = { | 279 | static const struct can_bittiming_const flexcan_bittiming_const = { |
@@ -870,7 +870,7 @@ static int flexcan_chip_start(struct net_device *dev) | |||
870 | * on most Flexcan cores, too. Otherwise we don't get | 870 | * on most Flexcan cores, too. Otherwise we don't get |
871 | * any error warning or passive interrupts. | 871 | * any error warning or passive interrupts. |
872 | */ | 872 | */ |
873 | if (priv->devtype_data->features & FLEXCAN_HAS_BROKEN_ERR_STATE || | 873 | if (priv->devtype_data->quirks & FLEXCAN_QUIRK_BROKEN_ERR_STATE || |
874 | priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) | 874 | priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) |
875 | reg_ctrl |= FLEXCAN_CTRL_ERR_MSK; | 875 | reg_ctrl |= FLEXCAN_CTRL_ERR_MSK; |
876 | else | 876 | else |
@@ -900,7 +900,7 @@ static int flexcan_chip_start(struct net_device *dev) | |||
900 | flexcan_write(0x0, ®s->rx14mask); | 900 | flexcan_write(0x0, ®s->rx14mask); |
901 | flexcan_write(0x0, ®s->rx15mask); | 901 | flexcan_write(0x0, ®s->rx15mask); |
902 | 902 | ||
903 | if (priv->devtype_data->features & FLEXCAN_HAS_V10_FEATURES) | 903 | if (priv->devtype_data->quirks & FLEXCAN_QUIRK_DISABLE_RXFG) |
904 | flexcan_write(0x0, ®s->rxfgmask); | 904 | flexcan_write(0x0, ®s->rxfgmask); |
905 | 905 | ||
906 | /* On Vybrid, disable memory error detection interrupts | 906 | /* On Vybrid, disable memory error detection interrupts |
@@ -909,7 +909,7 @@ static int flexcan_chip_start(struct net_device *dev) | |||
909 | * false positive memory errors and put the device in | 909 | * false positive memory errors and put the device in |
910 | * freeze mode. | 910 | * freeze mode. |
911 | */ | 911 | */ |
912 | if (priv->devtype_data->features & FLEXCAN_HAS_MECR_FEATURES) { | 912 | if (priv->devtype_data->quirks & FLEXCAN_QUIRK_DISABLE_MECR) { |
913 | /* Follow the protocol as described in "Detection | 913 | /* Follow the protocol as described in "Detection |
914 | * and Correction of Memory Errors" to write to | 914 | * and Correction of Memory Errors" to write to |
915 | * MECR register | 915 | * MECR register |