Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: imx2_wdt: Convert to use regmap framework's endianness method.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Xiubo Li and committed by
Wim Van Sebroeck
0461aea7 1f897a81

+2 -7
+2 -1
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
··· 7 7 8 8 Optional property: 9 9 - big-endian: If present the watchdog device's registers are implemented 10 - in big endian mode, otherwise in little mode. 10 + in big endian mode, otherwise in native mode(same with CPU), for more 11 + detail please see: Documentation/devicetree/bindings/regmap/regmap.txt. 11 12 12 13 Examples: 13 14
-6
drivers/watchdog/imx2_wdt.c
··· 191 191 192 192 static int __init imx2_wdt_probe(struct platform_device *pdev) 193 193 { 194 - struct device_node *np = pdev->dev.of_node; 195 194 struct imx2_wdt_device *wdev; 196 195 struct watchdog_device *wdog; 197 196 struct resource *res; 198 197 void __iomem *base; 199 - bool big_endian; 200 198 int ret; 201 199 u32 val; 202 200 203 201 wdev = devm_kzalloc(&pdev->dev, sizeof(*wdev), GFP_KERNEL); 204 202 if (!wdev) 205 203 return -ENOMEM; 206 - 207 - big_endian = of_property_read_bool(np, "big-endian"); 208 - if (big_endian) 209 - imx2_wdt_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG; 210 204 211 205 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 212 206 base = devm_ioremap_resource(&pdev->dev, res);