]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'regmap/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 5 Nov 2015 03:31:47 +0000 (14:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 5 Nov 2015 03:31:47 +0000 (14:31 +1100)
arch/mips/boot/dts/brcm/bcm6328.dtsi
arch/mips/boot/dts/brcm/bcm7125.dtsi
arch/mips/boot/dts/brcm/bcm7346.dtsi
arch/mips/boot/dts/brcm/bcm7358.dtsi
arch/mips/boot/dts/brcm/bcm7360.dtsi
arch/mips/boot/dts/brcm/bcm7362.dtsi
arch/mips/boot/dts/brcm/bcm7420.dtsi
arch/mips/boot/dts/brcm/bcm7425.dtsi
arch/mips/boot/dts/brcm/bcm7435.dtsi
drivers/base/regmap/regcache-rbtree.c
drivers/base/regmap/regmap-mmio.c

index 41891c1e58bda2554595d76a7b2c0261a11e2990..d52ce3d07f16dee81c5982212fe69f8cddc015d0 100644 (file)
@@ -73,7 +73,6 @@
                timer: timer@10000040 {
                        compatible = "syscon";
                        reg = <0x10000040 0x2c>;
-                       little-endian;
                };
 
                reboot {
index 1a7efa883c5e3fd2e046b554485270036193b382..4fc7ecee273c105027ff20cea02f2bd5cf86c9fe 100644 (file)
@@ -98,7 +98,6 @@
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7125-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x60c>;
-                       little-endian;
                };
 
                reboot {
index d817bb46b934fd1cb81388dd0d492f55c74171ed..01592f1668fe01baaae4c7c6070e5a9f3eb7aded 100644 (file)
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7346-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x51c>;
-                       little-endian;
                };
 
                reboot {
index 277a90adc1a78cb07834dd7c870ac374cc1557da..46be9715f14f6381a1334ea46472ec7682637e23 100644 (file)
@@ -94,7 +94,6 @@
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7358-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x51c>;
-                       little-endian;
                };
 
                reboot {
index 9e1e571ba346ad7a240faf5a18a54b3f108e3cc7..ed728e7507832fcc7b6a1986c5e633cbc3752b73 100644 (file)
@@ -94,7 +94,6 @@
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7360-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x51c>;
-                       little-endian;
                };
 
                reboot {
index 6e65db86fc618471df11f543b2569872d36f85b4..f0ca134b1621fb6d9aebc7138d0ce2ac03a5f98a 100644 (file)
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7362-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x51c>;
-                       little-endian;
                };
 
                reboot {
index 5f55d0a50a28622614ec6142eb0ff19746dfaade..bee221b3b56857c8d84dac3e2fa9bfe8b3c54a85 100644 (file)
@@ -99,7 +99,6 @@
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7420-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x60c>;
-                       little-endian;
                };
 
                reboot {
index 5b660b617eaddb799d04ad6f2e86f15fd767e17e..c8ab17af046944201fbf07feb09400c85cc6f20c 100644 (file)
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7425-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x51c>;
-                       little-endian;
                };
 
                reboot {
index 8b9432cc062bc7e89898f2f1f2213926193389f8..614ee211f71a89356dd1eb814a38ec3071885747 100644 (file)
                sun_top_ctrl: syscon@404000 {
                        compatible = "brcm,bcm7425-sun-top-ctrl", "syscon";
                        reg = <0x404000 0x51c>;
-                       little-endian;
                };
 
                reboot {
index 56486d92c4e72bd583630baea0fba541f36c926f..353f60236ce027ca7cdd843adb9c4056d7152be9 100644 (file)
@@ -413,8 +413,8 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
                max = reg + max_dist;
 
                /* look for an adjacent register to the one we are about to add */
-               for (node = rb_first(&rbtree_ctx->root); node;
-                    node = rb_next(node)) {
+               node = rbtree_ctx->root.rb_node;
+               while (node) {
                        rbnode_tmp = rb_entry(node, struct regcache_rbtree_node,
                                              node);
 
@@ -425,6 +425,11 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
                                new_base_reg = min(reg, base_reg);
                                new_top_reg = max(reg, top_reg);
                        } else {
+                               if (max < base_reg)
+                                       node = node->rb_left;
+                               else
+                                       node = node->rb_right;
+
                                continue;
                        }
 
index 426a57e41ac76071e213ebd69d9d454c51f92172..8a77876d439ad0003856f8a42993308590822cdb 100644 (file)
@@ -106,17 +106,17 @@ static int regmap_mmio_gather_write(void *context,
        while (val_size) {
                switch (ctx->val_bytes) {
                case 1:
-                       writeb(*(u8 *)val, ctx->regs + offset);
+                       __raw_writeb(*(u8 *)val, ctx->regs + offset);
                        break;
                case 2:
-                       writew(*(u16 *)val, ctx->regs + offset);
+                       __raw_writew(*(u16 *)val, ctx->regs + offset);
                        break;
                case 4:
-                       writel(*(u32 *)val, ctx->regs + offset);
+                       __raw_writel(*(u32 *)val, ctx->regs + offset);
                        break;
 #ifdef CONFIG_64BIT
                case 8:
-                       writeq(*(u64 *)val, ctx->regs + offset);
+                       __raw_writeq(*(u64 *)val, ctx->regs + offset);
                        break;
 #endif
                default:
@@ -166,17 +166,17 @@ static int regmap_mmio_read(void *context,
        while (val_size) {
                switch (ctx->val_bytes) {
                case 1:
-                       *(u8 *)val = readb(ctx->regs + offset);
+                       *(u8 *)val = __raw_readb(ctx->regs + offset);
                        break;
                case 2:
-                       *(u16 *)val = readw(ctx->regs + offset);
+                       *(u16 *)val = __raw_readw(ctx->regs + offset);
                        break;
                case 4:
-                       *(u32 *)val = readl(ctx->regs + offset);
+                       *(u32 *)val = __raw_readl(ctx->regs + offset);
                        break;
 #ifdef CONFIG_64BIT
                case 8:
-                       *(u64 *)val = readq(ctx->regs + offset);
+                       *(u64 *)val = __raw_readq(ctx->regs + offset);
                        break;
 #endif
                default: