diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 11:47:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 11:47:00 -0400 |
commit | e669830526a0abaf301bf408df69cde33901ac63 (patch) | |
tree | 0b6043375006d1754bbd1ab2370b0a0536546cc9 /arch/mips/txx9/generic | |
parent | ebb067d2f4e2db59b076f9c9cba0375a8ad1e07c (diff) | |
parent | 475d5928b79bb78326a645863d46ff95c5e25e5a (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"This is the main pull request for 3.17. It contains:
- misc Cavium Octeon, BCM47xx, BCM63xx and Alchemy updates
- MIPS ptrace updates and cleanups
- various fixes that will also go to -stable
- a number of cleanups and small non-critical fixes.
- NUMA support for the Loongson 3.
- more support for MSA
- support for MAAR
- various FP enhancements and fixes"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (139 commits)
MIPS: jz4740: remove unnecessary null test before debugfs_remove
MIPS: Octeon: remove unnecessary null test before debugfs_remove_recursive
MIPS: ZBOOT: implement stack protector in compressed boot phase
MIPS: mipsreg: remove duplicate MIPS_CONF4_FTLBSETS_SHIFT
MIPS: Bonito64: remove a duplicate define
MIPS: Malta: initialise MAARs
MIPS: Initialise MAARs
MIPS: detect presence of MAARs
MIPS: define MAAR register accessors & bits
MIPS: mark MSA experimental
MIPS: Don't build MSA support unless it can be used
MIPS: consistently clear MSA flags when starting & copying threads
MIPS: 16 byte align MSA vector context
MIPS: disable preemption whilst initialising MSA
MIPS: ensure MSA gets disabled during boot
MIPS: fix read_msa_* & write_msa_* functions on non-MSA toolchains
MIPS: fix MSA context for tasks which don't use FP first
MIPS: init upper 64b of vector registers when MSA is first used
MIPS: save/disable MSA in lose_fpu
MIPS: preserve scalar FP CSR when switching vector context
...
Diffstat (limited to 'arch/mips/txx9/generic')
-rw-r--r-- | arch/mips/txx9/generic/7segled.c | 14 | ||||
-rw-r--r-- | arch/mips/txx9/generic/pci.c | 4 | ||||
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 29 |
3 files changed, 32 insertions, 15 deletions
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c index 4642f56e70e5..566c58bd44d0 100644 --- a/arch/mips/txx9/generic/7segled.c +++ b/arch/mips/txx9/generic/7segled.c | |||
@@ -83,6 +83,11 @@ static struct bus_type tx_7segled_subsys = { | |||
83 | .dev_name = "7segled", | 83 | .dev_name = "7segled", |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static void tx_7segled_release(struct device *dev) | ||
87 | { | ||
88 | kfree(dev); | ||
89 | } | ||
90 | |||
86 | static int __init tx_7segled_init_sysfs(void) | 91 | static int __init tx_7segled_init_sysfs(void) |
87 | { | 92 | { |
88 | int error, i; | 93 | int error, i; |
@@ -103,11 +108,14 @@ static int __init tx_7segled_init_sysfs(void) | |||
103 | } | 108 | } |
104 | dev->id = i; | 109 | dev->id = i; |
105 | dev->bus = &tx_7segled_subsys; | 110 | dev->bus = &tx_7segled_subsys; |
111 | dev->release = &tx_7segled_release; | ||
106 | error = device_register(dev); | 112 | error = device_register(dev); |
107 | if (!error) { | 113 | if (error) { |
108 | device_create_file(dev, &dev_attr_ascii); | 114 | put_device(dev); |
109 | device_create_file(dev, &dev_attr_raw); | 115 | return error; |
110 | } | 116 | } |
117 | device_create_file(dev, &dev_attr_ascii); | ||
118 | device_create_file(dev, &dev_attr_raw); | ||
111 | } | 119 | } |
112 | return error; | 120 | return error; |
113 | } | 121 | } |
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index 28713274e0cc..a77698ff2b6f 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
@@ -268,7 +268,7 @@ static int txx9_i8259_irq_setup(int irq) | |||
268 | return err; | 268 | return err; |
269 | } | 269 | } |
270 | 270 | ||
271 | static void quirk_slc90e66_bridge(struct pci_dev *dev) | 271 | static void __init_refok quirk_slc90e66_bridge(struct pci_dev *dev) |
272 | { | 272 | { |
273 | int irq; /* PCI/ISA Bridge interrupt */ | 273 | int irq; /* PCI/ISA Bridge interrupt */ |
274 | u8 reg_64; | 274 | u8 reg_64; |
@@ -331,7 +331,7 @@ static void quirk_slc90e66_ide(struct pci_dev *dev) | |||
331 | * !!! DO NOT REMOVE THIS COMMENT IT IS REQUIRED BY SMSC !!! | 331 | * !!! DO NOT REMOVE THIS COMMENT IT IS REQUIRED BY SMSC !!! |
332 | */ | 332 | */ |
333 | dat |= 0x01; | 333 | dat |= 0x01; |
334 | pci_write_config_byte(dev, regs[i], dat); | 334 | pci_write_config_byte(dev, 0x5c, dat); |
335 | pci_read_config_byte(dev, 0x5c, &dat); | 335 | pci_read_config_byte(dev, 0x5c, &dat); |
336 | printk(KERN_CONT " REG5C %02x", dat); | 336 | printk(KERN_CONT " REG5C %02x", dat); |
337 | printk(KERN_CONT "\n"); | 337 | printk(KERN_CONT "\n"); |
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index dd2cf25b5ae5..9ff200ae1c9a 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -937,6 +937,14 @@ static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj, | |||
937 | return size; | 937 | return size; |
938 | } | 938 | } |
939 | 939 | ||
940 | static void txx9_device_release(struct device *dev) | ||
941 | { | ||
942 | struct txx9_sramc_dev *tdev; | ||
943 | |||
944 | tdev = container_of(dev, struct txx9_sramc_dev, dev); | ||
945 | kfree(tdev); | ||
946 | } | ||
947 | |||
940 | void __init txx9_sramc_init(struct resource *r) | 948 | void __init txx9_sramc_init(struct resource *r) |
941 | { | 949 | { |
942 | struct txx9_sramc_dev *dev; | 950 | struct txx9_sramc_dev *dev; |
@@ -951,8 +959,11 @@ void __init txx9_sramc_init(struct resource *r) | |||
951 | return; | 959 | return; |
952 | size = resource_size(r); | 960 | size = resource_size(r); |
953 | dev->base = ioremap(r->start, size); | 961 | dev->base = ioremap(r->start, size); |
954 | if (!dev->base) | 962 | if (!dev->base) { |
955 | goto exit; | 963 | kfree(dev); |
964 | return; | ||
965 | } | ||
966 | dev->dev.release = &txx9_device_release; | ||
956 | dev->dev.bus = &txx9_sramc_subsys; | 967 | dev->dev.bus = &txx9_sramc_subsys; |
957 | sysfs_bin_attr_init(&dev->bindata_attr); | 968 | sysfs_bin_attr_init(&dev->bindata_attr); |
958 | dev->bindata_attr.attr.name = "bindata"; | 969 | dev->bindata_attr.attr.name = "bindata"; |
@@ -963,17 +974,15 @@ void __init txx9_sramc_init(struct resource *r) | |||
963 | dev->bindata_attr.private = dev; | 974 | dev->bindata_attr.private = dev; |
964 | err = device_register(&dev->dev); | 975 | err = device_register(&dev->dev); |
965 | if (err) | 976 | if (err) |
966 | goto exit; | 977 | goto exit_put; |
967 | err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr); | 978 | err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr); |
968 | if (err) { | 979 | if (err) { |
969 | device_unregister(&dev->dev); | 980 | device_unregister(&dev->dev); |
970 | goto exit; | 981 | iounmap(dev->base); |
971 | } | ||
972 | return; | ||
973 | exit: | ||
974 | if (dev) { | ||
975 | if (dev->base) | ||
976 | iounmap(dev->base); | ||
977 | kfree(dev); | 982 | kfree(dev); |
978 | } | 983 | } |
984 | return; | ||
985 | exit_put: | ||
986 | put_device(&dev->dev); | ||
987 | return; | ||
979 | } | 988 | } |