[U-Boot] [PATCH] ftintc010.h: add header of ftintc010 interrupt controller
add header definition of faraday interrupt controller Signed-off-by: Macpaul Lin --- include/faraday/ftintc010.h | 101 +++ 1 files changed, 101 insertions(+), 0 deletions(-) create mode 100644 include/faraday/ftintc010.h diff --git a/include/faraday/ftintc010.h b/include/faraday/ftintc010.h new file mode 100644 index 000..f2e004b --- /dev/null +++ b/include/faraday/ftintc010.h @@ -0,0 +1,101 @@ +/* + * (C) Copyright 2012 Andes Technology Corp + * Macpaul Lin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * FTINTC010 - Faraday Interrupt Controller + */ +#ifndef __FTINTC010_H +#define __FTINTC010_H + +#ifndef __ASSEMBLY__ + +struct ftintc010 { + unsigned intirqsrc; /* 0x00 - IRQ Source */ + unsigned intirqen; /* 0x04 - IRQ Enable */ + unsigned intirqclr; /* 0x08 - IRQ Interrupt Clear */ + unsigned intirqtrigmode;/* 0x0C - IRQ Trigger Mode */ + unsigned intirqtriglevel; /* 0x10 - IRQ Trigger Level */ + unsigned intstatus; /* 0x14 - IRQ Status */ + unsigned intrsvd0[2]; /* 0x18-0x1C */ + unsigned intfiqsrc; /* 0x20 - FIQ Source */ + unsigned intfiqen; /* 0x24 - FIQ Enable */ + unsigned intfiqclr; /* 0x28 - FIQ Interrupt Clear */ + unsigned intfiqtrigmode;/* 0x2C - FIQ Trigger Mode */ + unsigned intfiqtriglevel; /* 0x30 - FIQ Trigger Level */ + unsigned intfiqstatus; /* 0x34 - FIQ Status */ + unsigned intrsvd1[6]; /* 0x38-0x4C */ + unsigned intrev;/* 0x50 - Revision */ + + /* The following are Feature Registers */ + unsigned intfrin; /* 0x54 - Input Number */ + unsigned intfrirqdl;/* 0x58 - IRQ De-bounce Location */ + unsigned intfrfiqdl;/* 0x5C - FIQ De-bounce Location */ +}; +#endif /* __ASSEMBLY__ */ + +/* 0x00 - IRQ Source Register */ +#define FTINTC010_IRQ_SRC(x) (1 << x) + +/* 0x04 - IRQ Enable Register */ +#define FTINTC010_IRQ_EN(x)(1 << x) + +/* 0x08 - IRQ Interrupt Clear Register */ +#define FTINTC010_IRQ_CLR(x) (1 << x) + +/* 0x0C - IRQ Trigger Mode Register */ +#define FTINTC010_IRQ_TRIGMODE(x) (1 << x) + +/* 0x10 - IRQ Trigger Level Register */ +#define FTINTC010_IRQ_TRIGLEVEL(x) (1 << x) + +/* 0x14 - IRQ Status Register */ +#define FTINTC010_IRQ_ST(x)(1 << x) + +/* 0x20 - FIQ Source Register */ +#define FTINTC010_FIQ_SRC(x) (1 << x) + +/* 0x24 - FIQ Enable Register */ +#define FTINTC010_FIQ_EN(x)(1 << x) + +/* 0x28 - FIQ Interrupt Clear Register */ +#define FTINTC010_FIQ_CLR(x) (1 << x) + +/* 0x2C - FIQ Trigger Mode Register */ +#define FTINTC010_FIQ_TRIGMODE(x) (1 << x) + +/* 0x30 - FIQ Trigger Level Register */ +#define FTINTC010_FIQ_TRIGLEVEL(x) (1 << x) + +/* 0x34 - FIQ Status Register */ +#define FTINTC010_FIQ_ST(x)(1 << x) + +/* 0x50 - Revision Register */ +#define FTINTC010_REV(x) (((x) > 0) & 0xFF) + +/* 0x54 - Feature Register for Input Number */ +#define FTINTC010_FRIN_IRQNO(x)(((x) > 8) & 0xFF) +#define FTINTC010_FRIN_FIQNO(x)(((x) > 0) & 0xFF) + +/* 0x58 - Feature Register for IRQ De-bounce Location */ +#define FTINTC010_IRQDL(x) (1 << x) + +/* 0x5C - Feature Register for FIQ De-bounce Location */ +#define FTINTC010_FIQDL(x) (1 << x) + +#endif /* __FTINTC010_H */ -- 1.7.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ftintc010.h: add header of ftintc010 interrupt controller
Dear Macpaul Lin, In message <1324024304-32444-1-git-send-email-macp...@andestech.com> you wrote: > add header definition of faraday interrupt controller > > Signed-off-by: Macpaul Lin > --- > include/faraday/ftintc010.h | 101 > +++ > 1 files changed, 101 insertions(+), 0 deletions(-) > create mode 100644 include/faraday/ftintc010.h Who needs that? Please submit together with any code thjat actually uses this. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Do you know about being with somebody? Wanting to be? If I had the whole universe, I'd give it to you, Janice. When I see you, I feel like I'm hungry all over. Do you know how that feels? -- Charlie Evans, "Charlie X", stardate 1535.8 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot