@@ -265,9 +265,7 @@ struct Stm32Rcc {
265
265
/* Register Values */
266
266
uint32_t
267
267
RCC_APB1ENR ,
268
- RCC_APB2ENR ,
269
- RCC_APB1RSTR ,
270
- RCC_APB2RSTR ;
268
+ RCC_APB2ENR ;
271
269
272
270
/* Register Field Values */
273
271
uint32_t
@@ -500,22 +498,6 @@ static void stm32_rcc_RCC_APB2ENR_write(Stm32Rcc *s, uint32_t new_value,
500
498
s -> RCC_APB2ENR = new_value & 0x0000fffd ;
501
499
}
502
500
503
- static void stm32_rcc_RCC_APB2RSTR_write (Stm32Rcc * s , uint32_t new_value ,
504
- bool init )
505
- {
506
- stm32_rcc_periph_enable (s , new_value , init , STM32_UART1 , RCC_APB2RSTR_USART1RST_BIT );
507
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOE , RCC_APB2RSTR_IOPERST_BIT );
508
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOD , RCC_APB2RSTR_IOPDRST_BIT );
509
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOC , RCC_APB2RSTR_IOPCRST_BIT );
510
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOB , RCC_APB2RSTR_IOPBRST_BIT );
511
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOA , RCC_APB2RSTR_IOPARST_BIT );
512
- stm32_rcc_periph_enable (s , new_value , init , STM32_AFIO_PERIPH , RCC_APB2RSTR_AFIORST_BIT );
513
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOG , RCC_APB2RSTR_IOPGRST_BIT );
514
- stm32_rcc_periph_enable (s , new_value , init , STM32_GPIOF , RCC_APB2RSTR_IOPFRST_BIT );
515
-
516
- s -> RCC_APB2RSTR = new_value & 0x0000fffd ;
517
- }
518
-
519
501
/* Write the APB1 peripheral clock enable register
520
502
* Enables/Disables the peripheral clocks based on each bit. */
521
503
static void stm32_rcc_RCC_APB1ENR_write (Stm32Rcc * s , uint32_t new_value ,
@@ -546,21 +528,6 @@ static void stm32_rcc_RCC_APB1ENR_write(Stm32Rcc *s, uint32_t new_value,
546
528
s -> RCC_APB1ENR = new_value & 0x00005e7d ;
547
529
}
548
530
549
- static void stm32_rcc_RCC_APB1RSTR_write (Stm32Rcc * s , uint32_t new_value ,
550
- bool init )
551
- {
552
- stm32_rcc_periph_enable (s , new_value , init , STM32_UART5 ,
553
- RCC_APB1RSTR_UART5RST_BIT );
554
- stm32_rcc_periph_enable (s , new_value , init , STM32_UART4 ,
555
- RCC_APB1RSTR_UART4RST_BIT );
556
- stm32_rcc_periph_enable (s , new_value , init , STM32_UART3 ,
557
- RCC_APB1RSTR_USART3RST_BIT );
558
- stm32_rcc_periph_enable (s , new_value , init , STM32_UART2 ,
559
- RCC_APB1RSTR_USART2RST_BIT );
560
-
561
- s -> RCC_APB1RSTR = new_value & 0x00005e7d ;
562
- }
563
-
564
531
static uint32_t stm32_rcc_RCC_BDCR_read (Stm32Rcc * s )
565
532
{
566
533
int lseon_bit = clktree_is_enabled (s -> LSECLK ) ? 1 : 0 ;
@@ -603,9 +570,11 @@ static uint64_t stm32_rcc_readw(void *opaque, hwaddr offset)
603
570
case RCC_CIR_OFFSET :
604
571
return 0 ;
605
572
case RCC_APB2RSTR_OFFSET :
606
- return s -> RCC_APB2RSTR ;
573
+ STM32_NOT_IMPL_REG (offset , 4 );
574
+ return 0 ;
607
575
case RCC_APB1RSTR_OFFSET :
608
- return s -> RCC_APB1RSTR ;
576
+ STM32_NOT_IMPL_REG (offset , 4 );
577
+ return 0 ;
609
578
case RCC_AHBENR_OFFSET :
610
579
STM32_NOT_IMPL_REG (offset , 4 );
611
580
return 0 ;
@@ -646,10 +615,10 @@ static void stm32_rcc_writew(void *opaque, hwaddr offset,
646
615
/* Allow a write but don't take any action */
647
616
break ;
648
617
case RCC_APB2RSTR_OFFSET :
649
- stm32_rcc_RCC_APB2RSTR_write ( s , value , false );
618
+ STM32_NOT_IMPL_REG ( offset , 4 );
650
619
break ;
651
620
case RCC_APB1RSTR_OFFSET :
652
- stm32_rcc_RCC_APB1RSTR_write ( s , value , false );
621
+ STM32_NOT_IMPL_REG ( offset , 4 );
653
622
break ;
654
623
case RCC_AHBENR_OFFSET :
655
624
STM32_NOT_IMPL_REG (offset , 4 );
0 commit comments