diff options
Diffstat (limited to 'arch/c6x/kernel')
| -rw-r--r-- | arch/c6x/kernel/irq.c | 21 | ||||
| -rw-r--r-- | arch/c6x/kernel/setup.c | 4 | ||||
| -rw-r--r-- | arch/c6x/kernel/signal.c | 2 |
3 files changed, 14 insertions, 13 deletions
diff --git a/arch/c6x/kernel/irq.c b/arch/c6x/kernel/irq.c index c90fb5e82ad7..247e0eb5e467 100644 --- a/arch/c6x/kernel/irq.c +++ b/arch/c6x/kernel/irq.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2011 Texas Instruments Incorporated | 2 | * Copyright (C) 2011-2012 Texas Instruments Incorporated |
| 3 | * | 3 | * |
| 4 | * This borrows heavily from powerpc version, which is: | 4 | * This borrows heavily from powerpc version, which is: |
| 5 | * | 5 | * |
| @@ -35,9 +35,7 @@ static DEFINE_RAW_SPINLOCK(core_irq_lock); | |||
| 35 | 35 | ||
| 36 | static void mask_core_irq(struct irq_data *data) | 36 | static void mask_core_irq(struct irq_data *data) |
| 37 | { | 37 | { |
| 38 | unsigned int prio = data->irq; | 38 | unsigned int prio = data->hwirq; |
| 39 | |||
| 40 | BUG_ON(prio < 4 || prio >= NR_PRIORITY_IRQS); | ||
| 41 | 39 | ||
| 42 | raw_spin_lock(&core_irq_lock); | 40 | raw_spin_lock(&core_irq_lock); |
| 43 | and_creg(IER, ~(1 << prio)); | 41 | and_creg(IER, ~(1 << prio)); |
| @@ -46,7 +44,7 @@ static void mask_core_irq(struct irq_data *data) | |||
| 46 | 44 | ||
| 47 | static void unmask_core_irq(struct irq_data *data) | 45 | static void unmask_core_irq(struct irq_data *data) |
| 48 | { | 46 | { |
| 49 | unsigned int prio = data->irq; | 47 | unsigned int prio = data->hwirq; |
| 50 | 48 | ||
| 51 | raw_spin_lock(&core_irq_lock); | 49 | raw_spin_lock(&core_irq_lock); |
| 52 | or_creg(IER, 1 << prio); | 50 | or_creg(IER, 1 << prio); |
| @@ -59,15 +57,15 @@ static struct irq_chip core_chip = { | |||
| 59 | .irq_unmask = unmask_core_irq, | 57 | .irq_unmask = unmask_core_irq, |
| 60 | }; | 58 | }; |
| 61 | 59 | ||
| 60 | static int prio_to_virq[NR_PRIORITY_IRQS]; | ||
| 61 | |||
| 62 | asmlinkage void c6x_do_IRQ(unsigned int prio, struct pt_regs *regs) | 62 | asmlinkage void c6x_do_IRQ(unsigned int prio, struct pt_regs *regs) |
| 63 | { | 63 | { |
| 64 | struct pt_regs *old_regs = set_irq_regs(regs); | 64 | struct pt_regs *old_regs = set_irq_regs(regs); |
| 65 | 65 | ||
| 66 | irq_enter(); | 66 | irq_enter(); |
| 67 | 67 | ||
| 68 | BUG_ON(prio < 4 || prio >= NR_PRIORITY_IRQS); | 68 | generic_handle_irq(prio_to_virq[prio]); |
| 69 | |||
| 70 | generic_handle_irq(prio); | ||
| 71 | 69 | ||
| 72 | irq_exit(); | 70 | irq_exit(); |
| 73 | 71 | ||
| @@ -82,6 +80,8 @@ static int core_domain_map(struct irq_domain *h, unsigned int virq, | |||
| 82 | if (hw < 4 || hw >= NR_PRIORITY_IRQS) | 80 | if (hw < 4 || hw >= NR_PRIORITY_IRQS) |
| 83 | return -EINVAL; | 81 | return -EINVAL; |
| 84 | 82 | ||
| 83 | prio_to_virq[hw] = virq; | ||
| 84 | |||
| 85 | irq_set_status_flags(virq, IRQ_LEVEL); | 85 | irq_set_status_flags(virq, IRQ_LEVEL); |
| 86 | irq_set_chip_and_handler(virq, &core_chip, handle_level_irq); | 86 | irq_set_chip_and_handler(virq, &core_chip, handle_level_irq); |
| 87 | return 0; | 87 | return 0; |
| @@ -102,9 +102,8 @@ void __init init_IRQ(void) | |||
| 102 | np = of_find_compatible_node(NULL, NULL, "ti,c64x+core-pic"); | 102 | np = of_find_compatible_node(NULL, NULL, "ti,c64x+core-pic"); |
| 103 | if (np != NULL) { | 103 | if (np != NULL) { |
| 104 | /* create the core host */ | 104 | /* create the core host */ |
| 105 | core_domain = irq_domain_add_legacy(np, NR_PRIORITY_IRQS, | 105 | core_domain = irq_domain_add_linear(np, NR_PRIORITY_IRQS, |
| 106 | 0, 0, &core_domain_ops, | 106 | &core_domain_ops, NULL); |
| 107 | NULL); | ||
| 108 | if (core_domain) | 107 | if (core_domain) |
| 109 | irq_set_default_host(core_domain); | 108 | irq_set_default_host(core_domain); |
| 110 | of_node_put(np); | 109 | of_node_put(np); |
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index ce46186600c5..f4e72bd8c103 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c | |||
| @@ -143,6 +143,10 @@ static void __init get_cpuinfo(void) | |||
| 143 | p->cpu_name = "C64x+"; | 143 | p->cpu_name = "C64x+"; |
| 144 | p->cpu_voltage = "1.2"; | 144 | p->cpu_voltage = "1.2"; |
| 145 | break; | 145 | break; |
| 146 | case 21: | ||
| 147 | p->cpu_name = "C66X"; | ||
| 148 | p->cpu_voltage = "1.2"; | ||
| 149 | break; | ||
| 146 | default: | 150 | default: |
| 147 | p->cpu_name = "unknown"; | 151 | p->cpu_name = "unknown"; |
| 148 | break; | 152 | break; |
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index 3d8f3c22a94f..3998b24e26f2 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c | |||
| @@ -249,8 +249,6 @@ static void handle_signal(int sig, | |||
| 249 | siginfo_t *info, struct k_sigaction *ka, | 249 | siginfo_t *info, struct k_sigaction *ka, |
| 250 | struct pt_regs *regs, int syscall) | 250 | struct pt_regs *regs, int syscall) |
| 251 | { | 251 | { |
| 252 | int ret; | ||
| 253 | |||
| 254 | /* Are we from a system call? */ | 252 | /* Are we from a system call? */ |
| 255 | if (syscall) { | 253 | if (syscall) { |
| 256 | /* If so, check system call restarting.. */ | 254 | /* If so, check system call restarting.. */ |
