Pratik Patel | 17f3b82 | 2011-11-21 12:41:47 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/module.h> |
Pratik Patel | cf41862 | 2011-09-22 11:15:11 -0700 | [diff] [blame] | 15 | #include <linux/init.h> |
| 16 | #include <linux/types.h> |
| 17 | #include <linux/device.h> |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/io.h> |
| 20 | #include <linux/err.h> |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 21 | #include <linux/slab.h> |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 22 | #include <linux/clk.h> |
Pratik Patel | 5f6d1af | 2012-06-13 15:48:13 -0700 | [diff] [blame^] | 23 | #include <linux/of_coresight.h> |
Pratik Patel | 1746b8f | 2012-06-02 21:11:41 -0700 | [diff] [blame] | 24 | #include <linux/coresight.h> |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 25 | |
Pratik Patel | 1746b8f | 2012-06-02 21:11:41 -0700 | [diff] [blame] | 26 | #include "coresight-priv.h" |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 27 | |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 28 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 29 | #define funnel_writel(drvdata, val, off) \ |
| 30 | __raw_writel((val), drvdata->base + off) |
| 31 | #define funnel_readl(drvdata, off) \ |
| 32 | __raw_readl(drvdata->base + off) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 33 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 34 | #define FUNNEL_LOCK(drvdata) \ |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 35 | do { \ |
| 36 | mb(); \ |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 37 | funnel_writel(drvdata, 0x0, CORESIGHT_LAR); \ |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 38 | } while (0) |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 39 | #define FUNNEL_UNLOCK(drvdata) \ |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 40 | do { \ |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 41 | funnel_writel(drvdata, CORESIGHT_UNLOCK, CORESIGHT_LAR); \ |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 42 | mb(); \ |
| 43 | } while (0) |
| 44 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 45 | |
| 46 | #define FUNNEL_FUNCTL (0x000) |
| 47 | #define FUNNEL_PRICTL (0x004) |
| 48 | #define FUNNEL_ITATBDATA0 (0xEEC) |
| 49 | #define FUNNEL_ITATBCTR2 (0xEF0) |
| 50 | #define FUNNEL_ITATBCTR1 (0xEF4) |
| 51 | #define FUNNEL_ITATBCTR0 (0xEF8) |
| 52 | |
| 53 | |
| 54 | #define FUNNEL_HOLDTIME_MASK (0xF00) |
| 55 | #define FUNNEL_HOLDTIME_SHFT (0x8) |
| 56 | #define FUNNEL_HOLDTIME (0x7 << FUNNEL_HOLDTIME_SHFT) |
| 57 | |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 58 | |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 59 | struct funnel_drvdata { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 60 | void __iomem *base; |
| 61 | struct device *dev; |
| 62 | struct coresight_device *csdev; |
| 63 | struct clk *clk; |
| 64 | uint32_t priority; |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 65 | }; |
| 66 | |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 67 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 68 | static void __funnel_enable(struct funnel_drvdata *drvdata, int port) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 69 | { |
| 70 | uint32_t functl; |
| 71 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 72 | FUNNEL_UNLOCK(drvdata); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 73 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 74 | functl = funnel_readl(drvdata, FUNNEL_FUNCTL); |
Pratik Patel | 61de730 | 2012-03-07 12:06:10 -0800 | [diff] [blame] | 75 | functl &= ~FUNNEL_HOLDTIME_MASK; |
| 76 | functl |= FUNNEL_HOLDTIME; |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 77 | functl |= (1 << port); |
| 78 | funnel_writel(drvdata, functl, FUNNEL_FUNCTL); |
| 79 | funnel_writel(drvdata, drvdata->priority, FUNNEL_PRICTL); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 80 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 81 | FUNNEL_LOCK(drvdata); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 82 | } |
| 83 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 84 | static int funnel_enable(struct coresight_device *csdev, int inport, |
| 85 | int outport) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 86 | { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 87 | struct funnel_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 88 | int ret; |
| 89 | |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 90 | ret = clk_prepare_enable(drvdata->clk); |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 91 | if (ret) |
| 92 | return ret; |
| 93 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 94 | __funnel_enable(drvdata, inport); |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 95 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 96 | dev_info(drvdata->dev, "FUNNEL inport %d enabled\n", inport); |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 97 | return 0; |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 98 | } |
| 99 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 100 | static void __funnel_disable(struct funnel_drvdata *drvdata, int inport) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 101 | { |
| 102 | uint32_t functl; |
| 103 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 104 | FUNNEL_UNLOCK(drvdata); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 105 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 106 | functl = funnel_readl(drvdata, FUNNEL_FUNCTL); |
| 107 | functl &= ~(1 << inport); |
| 108 | funnel_writel(drvdata, functl, FUNNEL_FUNCTL); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 109 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 110 | FUNNEL_LOCK(drvdata); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 111 | } |
| 112 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 113 | static void funnel_disable(struct coresight_device *csdev, int inport, |
| 114 | int outport) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 115 | { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 116 | struct funnel_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); |
| 117 | |
| 118 | __funnel_disable(drvdata, inport); |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 119 | |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 120 | clk_disable_unprepare(drvdata->clk); |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 121 | |
| 122 | dev_info(drvdata->dev, "FUNNEL inport %d disabled\n", inport); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 123 | } |
| 124 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 125 | static const struct coresight_ops_link funnel_link_ops = { |
| 126 | .enable = funnel_enable, |
| 127 | .disable = funnel_disable, |
| 128 | }; |
| 129 | |
| 130 | static const struct coresight_ops funnel_cs_ops = { |
| 131 | .link_ops = &funnel_link_ops, |
| 132 | }; |
| 133 | |
Pratik Patel | a9c0e06 | 2012-05-28 13:45:35 -0700 | [diff] [blame] | 134 | static ssize_t funnel_show_priority(struct device *dev, |
| 135 | struct device_attribute *attr, char *buf) |
| 136 | { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 137 | struct funnel_drvdata *drvdata = dev_get_drvdata(dev->parent); |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 138 | unsigned long val = drvdata->priority; |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 139 | |
Pratik Patel | a9c0e06 | 2012-05-28 13:45:35 -0700 | [diff] [blame] | 140 | return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); |
| 141 | } |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 142 | |
Pratik Patel | a9c0e06 | 2012-05-28 13:45:35 -0700 | [diff] [blame] | 143 | static ssize_t funnel_store_priority(struct device *dev, |
| 144 | struct device_attribute *attr, |
| 145 | const char *buf, size_t size) |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 146 | { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 147 | struct funnel_drvdata *drvdata = dev_get_drvdata(dev->parent); |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 148 | unsigned long val; |
| 149 | |
| 150 | if (sscanf(buf, "%lx", &val) != 1) |
| 151 | return -EINVAL; |
| 152 | |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 153 | drvdata->priority = val; |
Pratik Patel | a9c0e06 | 2012-05-28 13:45:35 -0700 | [diff] [blame] | 154 | return size; |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 155 | } |
Pratik Patel | a9c0e06 | 2012-05-28 13:45:35 -0700 | [diff] [blame] | 156 | static DEVICE_ATTR(priority, S_IRUGO | S_IWUSR, funnel_show_priority, |
| 157 | funnel_store_priority); |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 158 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 159 | static struct attribute *funnel_attrs[] = { |
| 160 | &dev_attr_priority.attr, |
| 161 | NULL, |
| 162 | }; |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 163 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 164 | static struct attribute_group funnel_attr_grp = { |
| 165 | .attrs = funnel_attrs, |
| 166 | }; |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 167 | |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 168 | static const struct attribute_group *funnel_attr_grps[] = { |
| 169 | &funnel_attr_grp, |
| 170 | NULL, |
| 171 | }; |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 172 | |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 173 | static int __devinit funnel_probe(struct platform_device *pdev) |
| 174 | { |
| 175 | int ret; |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 176 | struct device *dev = &pdev->dev; |
Pratik Patel | 5f6d1af | 2012-06-13 15:48:13 -0700 | [diff] [blame^] | 177 | struct coresight_platform_data *pdata; |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 178 | struct funnel_drvdata *drvdata; |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 179 | struct resource *res; |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 180 | struct coresight_desc *desc; |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 181 | |
Pratik Patel | 5f6d1af | 2012-06-13 15:48:13 -0700 | [diff] [blame^] | 182 | if (pdev->dev.of_node) { |
| 183 | pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node); |
| 184 | if (IS_ERR(pdata)) |
| 185 | return PTR_ERR(pdata); |
| 186 | pdev->dev.platform_data = pdata; |
| 187 | } |
| 188 | |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 189 | drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); |
| 190 | if (!drvdata) |
| 191 | return -ENOMEM; |
Pratik Patel | 16aefdb | 2012-05-30 10:41:23 -0700 | [diff] [blame] | 192 | drvdata->dev = &pdev->dev; |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 193 | platform_set_drvdata(pdev, drvdata); |
Pratik Patel | 783408a | 2012-03-21 10:28:12 -0700 | [diff] [blame] | 194 | |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 195 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 196 | if (!res) |
| 197 | return -ENODEV; |
| 198 | drvdata->base = devm_ioremap(dev, res->start, resource_size(res)); |
| 199 | if (!drvdata->base) |
| 200 | return -ENOMEM; |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 201 | |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 202 | drvdata->clk = devm_clk_get(dev, "core_clk"); |
| 203 | if (IS_ERR(drvdata->clk)) |
| 204 | return PTR_ERR(drvdata->clk); |
Pratik Patel | 6fb3834 | 2012-06-03 14:51:38 -0700 | [diff] [blame] | 205 | ret = clk_set_rate(drvdata->clk, CORESIGHT_CLK_RATE_TRACE); |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 206 | if (ret) |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 207 | return ret; |
Pratik Patel | f17b147 | 2012-05-25 22:23:52 -0700 | [diff] [blame] | 208 | |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 209 | desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); |
| 210 | if (!desc) |
| 211 | return -ENOMEM; |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 212 | desc->type = CORESIGHT_DEV_TYPE_LINK; |
| 213 | desc->subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_MERG; |
| 214 | desc->ops = &funnel_cs_ops; |
| 215 | desc->pdata = pdev->dev.platform_data; |
| 216 | desc->dev = &pdev->dev; |
| 217 | desc->groups = funnel_attr_grps; |
| 218 | desc->owner = THIS_MODULE; |
| 219 | drvdata->csdev = coresight_register(desc); |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 220 | if (IS_ERR(drvdata->csdev)) |
| 221 | return PTR_ERR(drvdata->csdev); |
Pratik Patel | 6630ebe | 2012-03-06 16:44:22 -0800 | [diff] [blame] | 222 | |
Pratik Patel | 4a1b252 | 2012-06-17 15:31:15 -0700 | [diff] [blame] | 223 | dev_info(dev, "FUNNEL initialized\n"); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 224 | return 0; |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 225 | } |
| 226 | |
Pratik Patel | f6fe918 | 2012-03-20 14:04:18 -0700 | [diff] [blame] | 227 | static int __devexit funnel_remove(struct platform_device *pdev) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 228 | { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 229 | struct funnel_drvdata *drvdata = platform_get_drvdata(pdev); |
| 230 | |
| 231 | coresight_unregister(drvdata->csdev); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 232 | return 0; |
| 233 | } |
| 234 | |
Pratik Patel | 9eae482 | 2012-05-14 17:34:53 -0700 | [diff] [blame] | 235 | static struct of_device_id funnel_match[] = { |
Pratik Patel | 5f6d1af | 2012-06-13 15:48:13 -0700 | [diff] [blame^] | 236 | {.compatible = "arm,coresight-funnel"}, |
Pratik Patel | 9eae482 | 2012-05-14 17:34:53 -0700 | [diff] [blame] | 237 | {} |
| 238 | }; |
| 239 | |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 240 | static struct platform_driver funnel_driver = { |
| 241 | .probe = funnel_probe, |
Pratik Patel | f6fe918 | 2012-03-20 14:04:18 -0700 | [diff] [blame] | 242 | .remove = __devexit_p(funnel_remove), |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 243 | .driver = { |
Pratik Patel | 3b0ca88 | 2012-06-01 16:54:14 -0700 | [diff] [blame] | 244 | .name = "coresight-funnel", |
Pratik Patel | 9eae482 | 2012-05-14 17:34:53 -0700 | [diff] [blame] | 245 | .owner = THIS_MODULE, |
| 246 | .of_match_table = funnel_match, |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 247 | }, |
| 248 | }; |
| 249 | |
Pratik Patel | f6fe918 | 2012-03-20 14:04:18 -0700 | [diff] [blame] | 250 | static int __init funnel_init(void) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 251 | { |
| 252 | return platform_driver_register(&funnel_driver); |
| 253 | } |
Pratik Patel | f6fe918 | 2012-03-20 14:04:18 -0700 | [diff] [blame] | 254 | module_init(funnel_init); |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 255 | |
Pratik Patel | f6fe918 | 2012-03-20 14:04:18 -0700 | [diff] [blame] | 256 | static void __exit funnel_exit(void) |
Pratik Patel | 7831c08 | 2011-06-08 21:44:37 -0700 | [diff] [blame] | 257 | { |
| 258 | platform_driver_unregister(&funnel_driver); |
| 259 | } |
Pratik Patel | f6fe918 | 2012-03-20 14:04:18 -0700 | [diff] [blame] | 260 | module_exit(funnel_exit); |
| 261 | |
| 262 | MODULE_LICENSE("GPL v2"); |
| 263 | MODULE_DESCRIPTION("CoreSight Funnel driver"); |