pmc: Add interrupt control and enable registers
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
		
				
					committed by
					
						 Jeremy Soller
						Jeremy Soller
					
				
			
			
				
	
			
			
			
						parent
						
							459e5a3614
						
					
				
				
					commit
					9302a30a2d
				
			| @@ -17,6 +17,10 @@ struct Pmc { | |||||||
|     volatile uint8_t *data_in; |     volatile uint8_t *data_in; | ||||||
|     // Control register |     // Control register | ||||||
|     volatile uint8_t *control; |     volatile uint8_t *control; | ||||||
|  |     // Interrupt control register | ||||||
|  |     volatile uint8_t *interrupt_control; | ||||||
|  |     // Interrupt enable register | ||||||
|  |     volatile uint8_t *interrupt_enable; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| extern struct Pmc __code PMC_1; | extern struct Pmc __code PMC_1; | ||||||
| @@ -36,27 +40,40 @@ void pmc_write(struct Pmc *pmc, uint8_t data); | |||||||
|  |  | ||||||
| volatile uint8_t __xdata __at(0x1500) PM1STS; | volatile uint8_t __xdata __at(0x1500) PM1STS; | ||||||
| volatile uint8_t __xdata __at(0x1501) PM1DO; | volatile uint8_t __xdata __at(0x1501) PM1DO; | ||||||
|  | volatile uint8_t __xdata __at(0x1502) PM1DOSCI; | ||||||
|  | volatile uint8_t __xdata __at(0x1503) PM1DOSMI; | ||||||
| volatile uint8_t __xdata __at(0x1504) PM1DI; | volatile uint8_t __xdata __at(0x1504) PM1DI; | ||||||
|  | volatile uint8_t __xdata __at(0x1505) PM1DISCI; | ||||||
| volatile uint8_t __xdata __at(0x1506) PM1CTL; | volatile uint8_t __xdata __at(0x1506) PM1CTL; | ||||||
|  | volatile uint8_t __xdata __at(0x1507) PM1IC; | ||||||
|  | volatile uint8_t __xdata __at(0x1508) PM1IE; | ||||||
|  |  | ||||||
| volatile uint8_t __xdata __at(0x1510) PM2STS; | volatile uint8_t __xdata __at(0x1510) PM2STS; | ||||||
| volatile uint8_t __xdata __at(0x1511) PM2DO; | volatile uint8_t __xdata __at(0x1511) PM2DO; | ||||||
| volatile uint8_t __xdata __at(0x1514) PM2DI; | volatile uint8_t __xdata __at(0x1514) PM2DI; | ||||||
| volatile uint8_t __xdata __at(0x1516) PM2CTL; | volatile uint8_t __xdata __at(0x1516) PM2CTL; | ||||||
|  | volatile uint8_t __xdata __at(0x1517) PM2IC; | ||||||
|  | volatile uint8_t __xdata __at(0x1518) PM2IE; | ||||||
|  |  | ||||||
| volatile uint8_t __xdata __at(0x1520) PM3STS; | volatile uint8_t __xdata __at(0x1520) PM3STS; | ||||||
| volatile uint8_t __xdata __at(0x1521) PM3DO; | volatile uint8_t __xdata __at(0x1521) PM3DO; | ||||||
| volatile uint8_t __xdata __at(0x1522) PM3DI; | volatile uint8_t __xdata __at(0x1522) PM3DI; | ||||||
| volatile uint8_t __xdata __at(0x1523) PM3CTL; | volatile uint8_t __xdata __at(0x1523) PM3CTL; | ||||||
|  | volatile uint8_t __xdata __at(0x1524) PM3IC; | ||||||
|  | volatile uint8_t __xdata __at(0x1525) PM3IE; | ||||||
|  |  | ||||||
| volatile uint8_t __xdata __at(0x1530) PM4STS; | volatile uint8_t __xdata __at(0x1530) PM4STS; | ||||||
| volatile uint8_t __xdata __at(0x1531) PM4DO; | volatile uint8_t __xdata __at(0x1531) PM4DO; | ||||||
| volatile uint8_t __xdata __at(0x1532) PM4DI; | volatile uint8_t __xdata __at(0x1532) PM4DI; | ||||||
| volatile uint8_t __xdata __at(0x1533) PM4CTL; | volatile uint8_t __xdata __at(0x1533) PM4CTL; | ||||||
|  | volatile uint8_t __xdata __at(0x1534) PM4IC; | ||||||
|  | volatile uint8_t __xdata __at(0x1535) PM4IE; | ||||||
|  |  | ||||||
| volatile uint8_t __xdata __at(0x1540) PM5STS; | volatile uint8_t __xdata __at(0x1540) PM5STS; | ||||||
| volatile uint8_t __xdata __at(0x1541) PM5DO; | volatile uint8_t __xdata __at(0x1541) PM5DO; | ||||||
| volatile uint8_t __xdata __at(0x1542) PM5DI; | volatile uint8_t __xdata __at(0x1542) PM5DI; | ||||||
| volatile uint8_t __xdata __at(0x1543) PM5CTL; | volatile uint8_t __xdata __at(0x1543) PM5CTL; | ||||||
|  | volatile uint8_t __xdata __at(0x1544) PM5IC; | ||||||
|  | volatile uint8_t __xdata __at(0x1545) PM5IE; | ||||||
|  |  | ||||||
| #endif // _EC_PMC_H | #endif // _EC_PMC_H | ||||||
|   | |||||||
| @@ -8,6 +8,8 @@ | |||||||
|     .data_out = &PM ## NUM ## DO, \ |     .data_out = &PM ## NUM ## DO, \ | ||||||
|     .data_in = &PM ## NUM ## DI, \ |     .data_in = &PM ## NUM ## DI, \ | ||||||
|     .control = &PM ## NUM ## CTL, \ |     .control = &PM ## NUM ## CTL, \ | ||||||
|  |     .interrupt_control = &PM ## NUM ## IC, \ | ||||||
|  |     .interrupt_enable = &PM ## NUM ## IE, \ | ||||||
| } | } | ||||||
| // clang-format on | // clang-format on | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user