diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 21:54:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 21:54:23 -0400 |
commit | 83c7f72259ea4bd0561e2f2762d97ee2888126ce (patch) | |
tree | c8b181e9f9a0bb061f5ab63fabb98197d7aee19a /sound | |
parent | e05644e17e744315bce12b0948cdc36910b9a76e (diff) | |
parent | 574ce79cea9d3fda109ffcc82f81733de4740e5c (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Benjamin Herrenschmidt:
"Notable highlights:
- iommu improvements from Anton removing the per-iommu global lock in
favor of dividing the DMA space into pools, each with its own lock,
and hashed on the CPU number. Along with making the locking more
fine grained, this gives significant improvements in multiqueue
networking scalability.
- Still from Anton, we know provide a vdso based variant of getcpu
which makes sched_getcpu with the appropriate glibc patch something
like 18 times faster.
- More anton goodness (he's been busy !) in other areas such as a
faster __clear_user and copy_page on P7, various perf fixes to
improve sampling quality, etc...
- One more step toward removing legacy i2c interfaces by using new
device-tree based probing of platform devices for the AOA audio
drivers
- A nice series of patches from Michael Neuling that helps avoiding
confusion between register numbers and litterals in assembly code,
trying to enforce the use of "%rN" register names in gas rather
than plain numbers.
- A pile of FSL updates
- The usual bunch of small fixes, cleanups etc...
You may spot a change to drivers/char/mem. The patch got no comment
or ack from outside, it's a trivial patch to allow the architecture to
skip creating /dev/port, which we use to disable it on ppc64 that
don't have a legacy brige. On those, IO ports 0...64K are not mapped
in kernel space at all, so accesses to /dev/port cause oopses (and
yes, distros -still- ship userspace that bangs hard coded ports such
as kbdrate)."
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (106 commits)
powerpc/mpic: Create a revmap with enough entries for IPIs and timers
Remove stale .rej file
powerpc/iommu: Fix iommu pool initialization
powerpc/eeh: Check handle_eeh_events() return value
powerpc/85xx: Add phy nodes in SGMII mode for MPC8536/44/72DS & P2020DS
powerpc/e500: add paravirt QEMU platform
powerpc/mpc85xx_ds: convert to unified PCI init
powerpc/fsl-pci: get PCI init out of board files
powerpc/85xx: Update corenet64_smp_defconfig
powerpc/85xx: Update corenet32_smp_defconfig
powerpc/85xx: Rename P1021RDB-PC device trees to be consistent
powerpc/watchdog: move booke watchdog param related code to setup-common.c
sound/aoa: Adapt to new i2c probing scheme
i2c/powermac: Improve detection of devices from device-tree
powerpc: Disable /dev/port interface on systems without an ISA bridge
of: Improve prom_update_property() function
powerpc: Add "memory" attribute for mfmsr()
powerpc/ftrace: Fix assembly trampoline register usage
powerpc/hw_breakpoints: Fix incorrect pointer access
powerpc: Put the gpr save/restore functions in their own section
...
Diffstat (limited to 'sound')
-rw-r--r-- | sound/aoa/codecs/onyx.c | 75 | ||||
-rw-r--r-- | sound/aoa/codecs/tas.c | 80 |
2 files changed, 6 insertions, 149 deletions
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index 270790d384e2..4cedc6950d72 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c | |||
@@ -997,45 +997,10 @@ static void onyx_exit_codec(struct aoa_codec *codec) | |||
997 | onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); | 997 | onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); |
998 | } | 998 | } |
999 | 999 | ||
1000 | static int onyx_create(struct i2c_adapter *adapter, | ||
1001 | struct device_node *node, | ||
1002 | int addr) | ||
1003 | { | ||
1004 | struct i2c_board_info info; | ||
1005 | struct i2c_client *client; | ||
1006 | |||
1007 | memset(&info, 0, sizeof(struct i2c_board_info)); | ||
1008 | strlcpy(info.type, "aoa_codec_onyx", I2C_NAME_SIZE); | ||
1009 | info.addr = addr; | ||
1010 | info.platform_data = node; | ||
1011 | client = i2c_new_device(adapter, &info); | ||
1012 | if (!client) | ||
1013 | return -ENODEV; | ||
1014 | |||
1015 | /* | ||
1016 | * We know the driver is already loaded, so the device should be | ||
1017 | * already bound. If not it means binding failed, which suggests | ||
1018 | * the device doesn't really exist and should be deleted. | ||
1019 | * Ideally this would be replaced by better checks _before_ | ||
1020 | * instantiating the device. | ||
1021 | */ | ||
1022 | if (!client->driver) { | ||
1023 | i2c_unregister_device(client); | ||
1024 | return -ENODEV; | ||
1025 | } | ||
1026 | |||
1027 | /* | ||
1028 | * Let i2c-core delete that device on driver removal. | ||
1029 | * This is safe because i2c-core holds the core_lock mutex for us. | ||
1030 | */ | ||
1031 | list_add_tail(&client->detected, &client->driver->clients); | ||
1032 | return 0; | ||
1033 | } | ||
1034 | |||
1035 | static int onyx_i2c_probe(struct i2c_client *client, | 1000 | static int onyx_i2c_probe(struct i2c_client *client, |
1036 | const struct i2c_device_id *id) | 1001 | const struct i2c_device_id *id) |
1037 | { | 1002 | { |
1038 | struct device_node *node = client->dev.platform_data; | 1003 | struct device_node *node = client->dev.of_node; |
1039 | struct onyx *onyx; | 1004 | struct onyx *onyx; |
1040 | u8 dummy; | 1005 | u8 dummy; |
1041 | 1006 | ||
@@ -1071,40 +1036,6 @@ static int onyx_i2c_probe(struct i2c_client *client, | |||
1071 | return -ENODEV; | 1036 | return -ENODEV; |
1072 | } | 1037 | } |
1073 | 1038 | ||
1074 | static int onyx_i2c_attach(struct i2c_adapter *adapter) | ||
1075 | { | ||
1076 | struct device_node *busnode, *dev = NULL; | ||
1077 | struct pmac_i2c_bus *bus; | ||
1078 | |||
1079 | bus = pmac_i2c_adapter_to_bus(adapter); | ||
1080 | if (bus == NULL) | ||
1081 | return -ENODEV; | ||
1082 | busnode = pmac_i2c_get_bus_node(bus); | ||
1083 | |||
1084 | while ((dev = of_get_next_child(busnode, dev)) != NULL) { | ||
1085 | if (of_device_is_compatible(dev, "pcm3052")) { | ||
1086 | const u32 *addr; | ||
1087 | printk(KERN_DEBUG PFX "found pcm3052\n"); | ||
1088 | addr = of_get_property(dev, "reg", NULL); | ||
1089 | if (!addr) | ||
1090 | return -ENODEV; | ||
1091 | return onyx_create(adapter, dev, (*addr)>>1); | ||
1092 | } | ||
1093 | } | ||
1094 | |||
1095 | /* if that didn't work, try desperate mode for older | ||
1096 | * machines that have stuff missing from the device tree */ | ||
1097 | |||
1098 | if (!of_device_is_compatible(busnode, "k2-i2c")) | ||
1099 | return -ENODEV; | ||
1100 | |||
1101 | printk(KERN_DEBUG PFX "found k2-i2c, checking if onyx chip is on it\n"); | ||
1102 | /* probe both possible addresses for the onyx chip */ | ||
1103 | if (onyx_create(adapter, NULL, 0x46) == 0) | ||
1104 | return 0; | ||
1105 | return onyx_create(adapter, NULL, 0x47); | ||
1106 | } | ||
1107 | |||
1108 | static int onyx_i2c_remove(struct i2c_client *client) | 1039 | static int onyx_i2c_remove(struct i2c_client *client) |
1109 | { | 1040 | { |
1110 | struct onyx *onyx = i2c_get_clientdata(client); | 1041 | struct onyx *onyx = i2c_get_clientdata(client); |
@@ -1117,16 +1048,16 @@ static int onyx_i2c_remove(struct i2c_client *client) | |||
1117 | } | 1048 | } |
1118 | 1049 | ||
1119 | static const struct i2c_device_id onyx_i2c_id[] = { | 1050 | static const struct i2c_device_id onyx_i2c_id[] = { |
1120 | { "aoa_codec_onyx", 0 }, | 1051 | { "MAC,pcm3052", 0 }, |
1121 | { } | 1052 | { } |
1122 | }; | 1053 | }; |
1054 | MODULE_DEVICE_TABLE(i2c,onyx_i2c_id); | ||
1123 | 1055 | ||
1124 | static struct i2c_driver onyx_driver = { | 1056 | static struct i2c_driver onyx_driver = { |
1125 | .driver = { | 1057 | .driver = { |
1126 | .name = "aoa_codec_onyx", | 1058 | .name = "aoa_codec_onyx", |
1127 | .owner = THIS_MODULE, | 1059 | .owner = THIS_MODULE, |
1128 | }, | 1060 | }, |
1129 | .attach_adapter = onyx_i2c_attach, | ||
1130 | .probe = onyx_i2c_probe, | 1061 | .probe = onyx_i2c_probe, |
1131 | .remove = onyx_i2c_remove, | 1062 | .remove = onyx_i2c_remove, |
1132 | .id_table = onyx_i2c_id, | 1063 | .id_table = onyx_i2c_id, |
diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c index 8e63d1f35ce1..c491ae0f749c 100644 --- a/sound/aoa/codecs/tas.c +++ b/sound/aoa/codecs/tas.c | |||
@@ -883,43 +883,10 @@ static void tas_exit_codec(struct aoa_codec *codec) | |||
883 | } | 883 | } |
884 | 884 | ||
885 | 885 | ||
886 | static int tas_create(struct i2c_adapter *adapter, | ||
887 | struct device_node *node, | ||
888 | int addr) | ||
889 | { | ||
890 | struct i2c_board_info info; | ||
891 | struct i2c_client *client; | ||
892 | |||
893 | memset(&info, 0, sizeof(struct i2c_board_info)); | ||
894 | strlcpy(info.type, "aoa_codec_tas", I2C_NAME_SIZE); | ||
895 | info.addr = addr; | ||
896 | info.platform_data = node; | ||
897 | |||
898 | client = i2c_new_device(adapter, &info); | ||
899 | if (!client) | ||
900 | return -ENODEV; | ||
901 | /* | ||
902 | * We know the driver is already loaded, so the device should be | ||
903 | * already bound. If not it means binding failed, and then there | ||
904 | * is no point in keeping the device instantiated. | ||
905 | */ | ||
906 | if (!client->driver) { | ||
907 | i2c_unregister_device(client); | ||
908 | return -ENODEV; | ||
909 | } | ||
910 | |||
911 | /* | ||
912 | * Let i2c-core delete that device on driver removal. | ||
913 | * This is safe because i2c-core holds the core_lock mutex for us. | ||
914 | */ | ||
915 | list_add_tail(&client->detected, &client->driver->clients); | ||
916 | return 0; | ||
917 | } | ||
918 | |||
919 | static int tas_i2c_probe(struct i2c_client *client, | 886 | static int tas_i2c_probe(struct i2c_client *client, |
920 | const struct i2c_device_id *id) | 887 | const struct i2c_device_id *id) |
921 | { | 888 | { |
922 | struct device_node *node = client->dev.platform_data; | 889 | struct device_node *node = client->dev.of_node; |
923 | struct tas *tas; | 890 | struct tas *tas; |
924 | 891 | ||
925 | tas = kzalloc(sizeof(struct tas), GFP_KERNEL); | 892 | tas = kzalloc(sizeof(struct tas), GFP_KERNEL); |
@@ -953,47 +920,6 @@ static int tas_i2c_probe(struct i2c_client *client, | |||
953 | return -EINVAL; | 920 | return -EINVAL; |
954 | } | 921 | } |
955 | 922 | ||
956 | static int tas_i2c_attach(struct i2c_adapter *adapter) | ||
957 | { | ||
958 | struct device_node *busnode, *dev = NULL; | ||
959 | struct pmac_i2c_bus *bus; | ||
960 | |||
961 | bus = pmac_i2c_adapter_to_bus(adapter); | ||
962 | if (bus == NULL) | ||
963 | return -ENODEV; | ||
964 | busnode = pmac_i2c_get_bus_node(bus); | ||
965 | |||
966 | while ((dev = of_get_next_child(busnode, dev)) != NULL) { | ||
967 | if (of_device_is_compatible(dev, "tas3004")) { | ||
968 | const u32 *addr; | ||
969 | printk(KERN_DEBUG PFX "found tas3004\n"); | ||
970 | addr = of_get_property(dev, "reg", NULL); | ||
971 | if (!addr) | ||
972 | continue; | ||
973 | return tas_create(adapter, dev, ((*addr) >> 1) & 0x7f); | ||
974 | } | ||
975 | /* older machines have no 'codec' node with a 'compatible' | ||
976 | * property that says 'tas3004', they just have a 'deq' | ||
977 | * node without any such property... */ | ||
978 | if (strcmp(dev->name, "deq") == 0) { | ||
979 | const u32 *_addr; | ||
980 | u32 addr; | ||
981 | printk(KERN_DEBUG PFX "found 'deq' node\n"); | ||
982 | _addr = of_get_property(dev, "i2c-address", NULL); | ||
983 | if (!_addr) | ||
984 | continue; | ||
985 | addr = ((*_addr) >> 1) & 0x7f; | ||
986 | /* now, if the address doesn't match any of the two | ||
987 | * that a tas3004 can have, we cannot handle this. | ||
988 | * I doubt it ever happens but hey. */ | ||
989 | if (addr != 0x34 && addr != 0x35) | ||
990 | continue; | ||
991 | return tas_create(adapter, dev, addr); | ||
992 | } | ||
993 | } | ||
994 | return -ENODEV; | ||
995 | } | ||
996 | |||
997 | static int tas_i2c_remove(struct i2c_client *client) | 923 | static int tas_i2c_remove(struct i2c_client *client) |
998 | { | 924 | { |
999 | struct tas *tas = i2c_get_clientdata(client); | 925 | struct tas *tas = i2c_get_clientdata(client); |
@@ -1011,16 +937,16 @@ static int tas_i2c_remove(struct i2c_client *client) | |||
1011 | } | 937 | } |
1012 | 938 | ||
1013 | static const struct i2c_device_id tas_i2c_id[] = { | 939 | static const struct i2c_device_id tas_i2c_id[] = { |
1014 | { "aoa_codec_tas", 0 }, | 940 | { "MAC,tas3004", 0 }, |
1015 | { } | 941 | { } |
1016 | }; | 942 | }; |
943 | MODULE_DEVICE_TABLE(i2c,tas_i2c_id); | ||
1017 | 944 | ||
1018 | static struct i2c_driver tas_driver = { | 945 | static struct i2c_driver tas_driver = { |
1019 | .driver = { | 946 | .driver = { |
1020 | .name = "aoa_codec_tas", | 947 | .name = "aoa_codec_tas", |
1021 | .owner = THIS_MODULE, | 948 | .owner = THIS_MODULE, |
1022 | }, | 949 | }, |
1023 | .attach_adapter = tas_i2c_attach, | ||
1024 | .probe = tas_i2c_probe, | 950 | .probe = tas_i2c_probe, |
1025 | .remove = tas_i2c_remove, | 951 | .remove = tas_i2c_remove, |
1026 | .id_table = tas_i2c_id, | 952 | .id_table = tas_i2c_id, |